On Sat, Aug 02, 2003 at 09:53:07PM -0600, John Williams wrote: : Perl5 map and grep allow the first argument to be an expression which is : passed to the function instead of being evaluated. (Sort of a bare block.) : What does the signature for this look like? Is it done with "is parsed" : tricks, or will perl6 require the "map BLOCK LIST" syntax?
A closure is required as the first argument for map, I think. On the other hand, grep could be generalized to anything that can smart match, since it's just looking for a boolean. But if you're going to use any kind of placeholder (including $_), there has to be a closure. Larry