Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^5: map {} list or do {} for list?

by SuicideJunkie (Vicar)
on Apr 14, 2014 at 14:30 UTC ( #1082247=note: print w/replies, xml ) Need Help??


in reply to Re^4: map {} list or do {} for list?
in thread map {} list or do {} for list?

Sorry, I didn't mean to imply that it wasn't optimized away.

I meant that when reading the code, map says "Hey! Pay attention to the return values of this code block, we're making a list of them."

Replies are listed 'Best First'.
Re^6: map {} list or do {} for list?
by jethro (Monsignor) on Apr 15, 2014 at 09:30 UTC

    Well, the same could be said of "$i++;'. In other words, if god had not meant us to throw away results, he wouldn't have given us void context ;-)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1082247]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2020-09-19 00:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (114 votes). Check out past polls.

    Notices?