Dave Whipp writes:
> Another, very different, situation where laziness is good is to abstract 
> fork/join situations:
> 
> 
>    my $a is lazy_thread := expensive_fn1(...);
>    my $b is lazy_thread := expensive_fn2(...);
> 
>    print $a + $b;
> 
> In this scenario, each expensive evaluation would be launched as a 
> separate thread. When the resulting value is later used, then the thread 
> would be joined, blocking if the thread is not complete.

That is gorgeous.  C<lazy_thread> isn't a good name, but it's a
marvelous concept.  Thanks.

Luke

Reply via email to