Fwd: Fwd: Junctive puzzles.

2005-02-11 Thread Thomas Yandell
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 + Subject: Re: Fwd: Junctive puzzles. To: "Patrick R. Michaud" <[EMAIL PROTECTED]> If only I c

Re: Fwd: Junctive puzzles.

2005-02-11 Thread Patrick R. Michaud
On Thu, Feb 10, 2005 at 12:02:01PM -0600, Rod Adams wrote: > [...] > If this is the case, then this entire discussion collapses into how to > best convert arrays into junctions and junctions into arrays. Perl's > existing abilities to edit arrays should be more than sufficient for > editing junc

Re: Fwd: Junctive puzzles.

2005-02-11 Thread Patrick R. Michaud
On Thu, Feb 10, 2005 at 12:02:01PM -0600, Rod Adams wrote: > Patrick R. Michaud wrote: > > >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). > > > > > Funny. I thoug

Re: Fwd: Junctive puzzles.

2005-02-10 Thread Damian Conway
Rod Adams wrote: The overall impression I'm getting here is that we need some syntax for saying: $x = any(1..1000) such_that is_prime($x); In standard Perl 6 that'd be: $x = any(grep {is_prime $^x} 1..1000); or, if you prefer your constraints postfixed: $x = any( (1..1000).grep({is_prime $^x}

Re: Fwd: Junctive puzzles.

2005-02-10 Thread Damian Conway
Patrick Michaud wrote: On Thu, Feb 10, 2005 at 10:42:34AM +, 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: Patrick is right on the money here...as usual. (Don't you just

Re: Fwd: Junctive puzzles.

2005-02-10 Thread Rod Adams
Patrick R. Michaud wrote: 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). Funny. I thought $x would contain 'true' here, since C was a boolean operator. But I could be very wro

Re: Fwd: Junctive puzzles.

2005-02-10 Thread Patrick R. Michaud
On Thu, Feb 10, 2005 at 10:42:34AM +, 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 wro

Fwd: Junctive puzzles.

2005-02-10 Thread Thomas Yandell
Sorry if you get this twice (and slightly different), but I posted it off list by mistake. -- Forwarded message -- From: Thomas Yandell <[EMAIL PROTECTED]> Date: Thu, 10 Feb 2005 10:22:44 + Subject: Re: Junctive puzzles. To: Matthew Walton <[EMAIL PROTECTED]> > > What if junc