in reply to Re: map versus for
in thread map versus for
That's pretty much the distinction I'd make as well, although I usually phrase it another way: for is for generic iteration, map is specifically a transformation.
A surefire way to annoy me and lose points when we get sample code is people who for whatever reason use map in void context rather than a proper for loop (it doesn't say "LOOK I R IDIOMATIC CODERZ", it says "ITERATION: UR DOIN IT WRONG" (and yes, I do have a lolcat based scale for applicants :)).
The cake is a lie.
The cake is a lie.
The cake is a lie.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: map versus for
by actualize (Monk) on Aug 04, 2008 at 20:12 UTC | |
by Fletch (Bishop) on Aug 04, 2008 at 20:50 UTC | |
by actualize (Monk) on Aug 04, 2008 at 21:09 UTC | |
by blazar (Canon) on Aug 05, 2008 at 22:07 UTC |