On Tue, Mar 10, 2009 at 12:09 AM, Larry Wall <la...@wall.org> wrote: > > Yes, the only difference between C<for> and C<map> is that you can > only use C<for> at the start of a statement. But we're more liberal > about where statements are expected in Perl 6, so you can say things > like: > > my @results = do for @list -> $x {...}; > my @results = (for @list -> $x {...}); > > and either of those is equivalent to: > > my @results = map -> $x {...}, @list; > > I also Officially Don't Care if you use map in a void context. :) > > Larry >
I would propose there to be one difference between for an map: map should bind its arguments read-only, for should bind them read-write. That would make at least one bad practice an error. Leon