Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2017-06-23 22:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (555 votes). Check out past polls.