Michael Lazzaro wrote: > I would still like to be able to do things in Perl6 like: > > @out = sort map {...} grep { ... } @in; # [1] > > The only encompassing solution would seem to be to find a grammar rule > by which map,grep,etc are unambiguously methods of Array, but can > still be called in a fashion similar to [1]. That would, I suspect, > satisfy everyone.
What if the thing being C<sort>ed (or whatever) is not an array but a list? @out = sort $scalar, @array, result_of_calling_function($param); Would the list have to be stored in an array before it could be sorted? That doesn't sound very nice ... @out = [$scalar, @array, result_of_calling_function($param)].sort; I think I'm in favour of things that operate on an arbitrary lists remaining functions rather than becoming methods. Smylers