Richard (>):
> Consider
>
> $x = any (1,2,5,6)
>
> How do we compose a conditional that asks if any of this set of eigenstates
> are simultaneously both > 2 and < 5?
> Clearly the desired answer for $x is False, but
>
> my $x = any(1,2,5,6); say ?( 2 < $x < 5); # true
>
> Is there some combination of any/all that will achieve this?

my @x = 1, 2, 5, 6; say ?(first { 2 < $_ < 5 }, @x); # false

Problem solved. It doesn't involve the cool junctions technology, but
it's not much longer, and perhaps slightly more understandable.

// Carl

Reply via email to