Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: mapcar -- map for more than one list

by mugwumpjism (Hermit)
on Dec 01, 2001 at 00:50 UTC ( #128738=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    (defun mapcar* (function &rest args)
      "Apply FUNCTION to successive cars of all ARGS.
    Return the list of results."
    ...
    
    (mapcar* 'cons '(a b c) '(1 2 3 4))
         => ((a . 1) (b . 2) (c . 3))
    
  2. or download this
    sub mapeach (&\%)
    {
        my $sub = shift;
    ...
    
        return wantarray ? @ret : { @ret };
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2015-07-07 23:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls