chickadee » ck-macros » c-map3

(c-map2 '(OP ...) L1 L2) → listsyntax
(c-map3 '(OP ...) L1 L2 L3) → listsyntax
(c-map4 '(OP ...) L1 L2 L3 L4) → listsyntax
(c-map5 '(OP ...) L1 L2 L3 L4 L5) → listsyntax

Like c-map1, but they accept exactly two, three, four, or five lists respectively. OP must accept two, three, four, or five extra arguments. If the lists are different lengths, terminates when the shortest list runs out. Analogous to map from SRFI 1, but they accept a specific number of lists. Added in version 0.2.0.

;; The argument '(1 2) is shortest so the result only has two items.
(ck () (c-quote (c-map3 '(c-list) '(a b c) '(1 2) '(x y z))))
;; ==> '((a 1 x) (b 2 y))