Larry Wall wrote:
> Moritz Lenz wrote:
> : Either it's parsed as '@a = (W, W)' (list assignment), then @a should
> : get both elements, and so should @z.
> Not according to S03, at least by one reading. �...@a as a scalar
> container only wants one item, so it only takes the first item off
> the list, and the list assignment produces a warning on the second
> because it's discarded. Since an assignment returns its left side,
> only one element is available to @z from @a.
So, do we still have p5's 'want_array' (or whatever it was called)?
That is, the predicate that tells the you whether the function is
being called in item or list context? I know that the generalized
'want' function proved to be unworkable; but I'd expect p6 to at least
be able to do everything that p5 can do; and that includes functions
that are aware of whether they're being used as singular or plural.
Jonathan "Dataweaver" Lang