Going to get the hang of this sending to a list thing soon. ---------- Forwarded message ---------- From: Thomas Yandell <[EMAIL PROTECTED]> Date: Fri, 11 Feb 2005 09:40:03 +0000 Subject: Re: Fwd: Junctive puzzles. To: "Patrick R. Michaud" <[EMAIL PROTECTED]>
If only I could just do something like: perl6 -MData::Dumper -e 'print Dumper(any(2,3,4,5) && any(4,5,6,7))' ...then I could easily find out for myself. Until that happy day I will have to ask you guys to clear it up for me. Is there another operator that takes the intersection of two junctions, such that any(2,3,4,5) *some op* any(4,5,6,7) would result in any(4,5)? Tom On Thu, 10 Feb 2005 08:19:44 -0600, Patrick R. Michaud <[EMAIL PROTECTED]> wrote: > On Thu, Feb 10, 2005 at 10:42:34AM +0000, Thomas Yandell wrote: > > Is the following comment correct? > > > > my $x = any(2,3,4,5) and any(4,5,6,7); # $x now contains any(4,5) > > Short answer: I don't think so. > > Long answer: I tend to get very lost when dealing with junctions, so > I can be completely wrong. However, watch the precedence and meanings > of the operators here -- I would think that > > my $x = any(2,3,4,5) and any(4,5,6,7); > > results in $x containing any(2,3,4,5), just as > > my $y = 2 and 3; > > results in $y containing 2 (since C<and> has lower precedence than C<=>). > > Even if you fixed the =/and precedence with parens, to read > > my $x = (any(2,3,4,5) and any(4,5,6,7)); > > then I think the result is still that $x contains any(4,5,6,7). > It gets interpreted as (from S09): > > $x = any( 2 and 4, # 4 > 2 and 5, # 5 > 2 and 6, # 6 > 2 and 7, # 7 > 3 and 4, # 4 > 3 and 5, # 5 > # etc... > 5 and 6, # 6 > 5 and 7, # 7 > ); > > which ultimately boils down to any(4,5,6,7). > > Pm >