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 };
    }