Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Understanding the map function

by castaway (Parson)
on Jul 14, 2005 at 09:23 UTC ( [id://474802]=note: print w/replies, xml ) Need Help??


in reply to Understanding the map function

It makes perfect sense to me, though I would probably rephrase it thusly:

Evaluates the BLOCK or EXPR for each element of LIST (locally setting $_ to each element) and returns a list of the results .

That help any?

C.

Replies are listed 'Best First'.
Re^2: Understanding the map function
by wfsp (Abbot) on Jul 14, 2005 at 09:55 UTC
    Nitpick.

    ...returns a list value for each element of LIST...

    It took me a while to get my head 'round that. Once you do the docs make more sense.

      That would make it more confusing, to me. It already says 'evaluates something for each element in list', thus 'returns a list of the results' cant mean anything but 'list of evaluated somethings for each element in list' ... or not?

      C.

      That edit makes the definition imprecise. map can return multiple list values for each element of LIST.

      --jwest



      -><- -><- -><- -><- -><-
      All things are Perfect
          To every last Flaw
          And bound in accord
               With Eris's Law
       - HBT; The Book of Advice, 1:7
      
Re^2: Understanding the map function
by anonymized user 468275 (Curate) on Jul 14, 2005 at 09:25 UTC
    Thanks - I prefer your suggestion, which makes a clear overview from the beginning.

    Hmmm... though I wonder if anything makes sense provided you already know everything it is trying to say.

    One world, one people

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2024-04-20 05:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found