--- Michele Dondi <[EMAIL PROTECTED]> wrote:
> On Tue, 13 Jul 2004, Austin Hastings wrote:
>
> > Using google(+perl6 +"cartesian product") would have led you to the
> > conclusion that this is already included. I hope this is horribly
> > wrong, since the syntax is a little bewildering.
> [...]
> > See Luke Palmer's "Outer product considered useful" post:
> > http://www.mail-archive.com/[EMAIL PROTECTED]/msg15513.html
>
> That's exactly the point! I wish too there were a more intuitive
> syntax, possibly even employing a predefined array variable if none
> is explicitly specified...
Boggle! While C<outer> may not be totally intuitive, it's not far off.
Likewise, the latin-1 version is pretty good:
for @x � @y � @z -> $x, $y, $z {
...
}
Is there some even more intuitive way than this?
> On Tue, 13 Jul 2004, Jonathan Scott Duff wrote:
>
> > Are you sure?
> >
> > for zip(1..10, 5..20, <<foo bar baz>>) -> $x, $y, $text {
> > do_something_with $x,$y,$text;
> > }
>
> Not sure at all: admittedly I may well be one of the less informed
> ones about Perl6 here. Though as far as I can understand zip() is for
> iterating *in parallel*, and both other replies here and discussion
> previously held here seem to indicate that it is so.
No, � (C<zip>) is wrong for this. (It's the inner product, so it really
ought to be '�' (C<inner>) except for the wierd origin.)
=Austin