in reply to map versus for
The bigger point, though, is that by using map, you're telling me more about your intent with the code. map says "I'm doing something to each element, something that's probably easily described, and accumulating the result." On the other hand, for says "I'm doing something with each element and it could be anything."
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: map versus for
by Fletch (Bishop) on Aug 04, 2008 at 15:12 UTC | |
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 |