Think about map, grep, and sort as operating on lists as a whole. That's what made the functional parts of Perl really click for me. for-loops operate on items that just happen to be bundled in lists. map and grep operate on lists that just happen to have items in them.
------
We are the carpenters and bricklayers of the Information Age.
Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose
I shouldn't have to say this, but any code, unless otherwise stated, is untested
In reply to Re: Re: Re: "foreach" is to "next" as "map" is to ???
by dragonchild
in thread "foreach" is to "next" as "map" is to ???
by McMahon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |