24 Jan
2020
24 Jan
'20
9:38 a.m.
On Fri, Jan 24, 2020 at 09:34:04AM +0000, Richard W.M. Jones wrote:
Or even better if you lazily evaluate the regexp so it is only compiled once when the function is first called:
let is_nonnil_uuid = let rex_uuid = lazy ( let nil_uuid = "00000000-0000-0000-0000-000000000000" in
nil_uuid needs to be defined outside the lazy () clause, but you get the idea. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html