I think of map as returning a list, and if you're discarding the list, I wonder if there's something wrong. I think, "why didn't the programmer just use for?"But that shows more about you than about the programmer. Nothing in void context (or even non-void scalar context) returns a list.
And the efficiency bug that made map construct a list internally was solved many years ago. As for more than one way to make a list, the programmer doesn't just have the option between map and for, there's also while, until, goto and bare blocks. And C-style for. I never think seeing one loop "Hmm, the programmer didn't use any of the other 6 types of loops, I wonder what's wrong". That only hinders my ability to understand the code.
In reply to Re^2: map in void context
by JavaFan
in thread map in void context
by dharanivasan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |