Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: mapcar -- map for more than one list

by mugwumpjism (Hermit)
on Dec 01, 2001 at 00:50 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://128738]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-25 04:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found