On May 21, 2006, at 22:29, Matt Diephouse wrote:

foo([,[EMAIL PROTECTED]); # okay: @onetothree flattened to three args

In this example, $x, $y, and $z are positional args. I would expect C<
foo(1,2,3) > and C< foo([,[EMAIL PROTECTED]) > to be identical calls --
even wrt multi dispatch. $x, $y, and $z are still positional even if
foo is called with a flattened array, right?

[,] (reduce operator) is a function call, which is creating a lazy list of 'Captures'

From S02:
o List context in Perl 6 is by default lazy. This means a list can contain infinite generators without blowing up. No flattening hap- pens to a lazy list until it is bound to the signature of a func- tion or method at call time (and maybe not even then). We say that
           such an argument list is "lazily flattened", meaning that we
           promise to flatten the list on demand, but not before.

That's still no sign of providing multi invocants, the more that could easily cause double dispatch - first find a multi that might or might not slurp then possibly redispatch according to some flattened positionals.

leo

Reply via email to