[EMAIL PROTECTED] wrote:

pugs> ? 4 < (0 | 6) < 2
(#t|#f)


Here's my take on it.

Compare

my $a = (0 | 6);
say 4 < $a and $a < 2;

vs

say 4 < (0 | 6) and (0 | 6) < 2;

The difference is that in the first case the junction refers to the same object, and the result should probably be expanded only once:

(4 < 0 and 0 < 2) | (4 < 6 and 6 < 2)

while in the second case, we have two different junctions, and each gets threaded separately:

(4 < 0 and 0 < 2) | (4 < 6 and 6 < 2) | (4 < 0 and 6 < 2) | (4 < 6 and 0 < 2)

The first expansion gives the correct result, while the other is really a variant on what you have. And I believe this becomes highly dangerous if you start assigning junctions around. :)

   Miro



Reply via email to