Function: cl--mapcar-many
cl--mapcar-many is an autoloaded and byte-compiled function defined in
cl-extra.el.gz.
Signature
(cl--mapcar-many FUNC SEQS &optional ACC)
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/cl-extra.el.gz
;;; Control structures.
;;;###autoload
(defun cl--mapcar-many (func seqs &optional acc)
(if (cdr (cdr seqs))
(let* ((res nil)
(n (apply #'min (mapcar #'length seqs)))
(i 0)
(args (copy-sequence seqs))
p1 p2)
(setq seqs (copy-sequence seqs))
(while (< i n)
(setq p1 seqs p2 args)
(while p1
(setcar p2
(if (consp (car p1))
(prog1 (car (car p1))
(setcar p1 (cdr (car p1))))
(aref (car p1) i)))
(setq p1 (cdr p1) p2 (cdr p2)))
(if acc
(push (apply func args) res)
(apply func args))
(setq i (1+ i)))
(and acc (nreverse res)))
(let ((res nil)
(x (car seqs))
(y (nth 1 seqs)))
(let ((n (min (length x) (length y)))
(i -1))
(while (< (setq i (1+ i)) n)
(let ((val (funcall func
(if (consp x) (pop x) (aref x i))
(if (consp y) (pop y) (aref y i)))))
(when acc
(push val res)))))
(and acc (nreverse res)))))