Re: Calling junctions of closures

2005-04-25 Thread Thomas Sandlaß
Brad Bowman wrote: my $a = rand(); # runtime variable my $result = one(any( sub { $a+1}, sub { $a-1} ),sub { $a+3 }).(); say $result.perl; If $a was 0.5 I'd guess $result = one(any(1.5, 0.5), 3.5) is this the case? IIRC the .perl method produces a string from which an equal value can be

Calling junctions of closures

2005-04-20 Thread Brad Bowman
Hi, Assuming this is allowed, what will the .() calls below return? Does the result depend on the calling context? use junctions; # still required? my @subs = ( sub { return 1 } , sub { return 2 } ); # call the closures in the junction any(@subs).(); all(@subs).();

Re: Calling junctions of closures

2005-04-20 Thread Thomas Sandlaß
Brad Bowman wrote: Assuming this is allowed, what will the .() calls below return? Does the result depend on the calling context? ... one(any(@subs),sub { ... }).(); Starting to argument from the statement that junctions are values the above plays in the league of 3.() which might not have