2009/3/2 Moritz Lenz <ml...@physik.uni-wuerzburg.de>: > Thomas Chust wrote: >> [...] >> Therefore I think that it would be a nice addition for Perl 6 if the >> X...X, <<...>> and similar operators could be applied to anonymous >> subroutines in addition to other operators. If such a syntactic change >> wasn't possible it would probably be worthwhile to offer methods like >> map and fold on array instances that take subroutine references as an >> alternative. > > There are already. You could write my example above also as > > @values.map(&map_function).reduce(&reduce_function) > [...]
Thanks for pointing this out. Apparently I must have overlooked them or looked at outdated documentation. cu, Thomas -- When C++ is your hammer, every problem looks like your thumb.