Simplified Common Lisp reference
mapcan
Symbol class: Conses, Lists and related functions
Syntax:
Symbol type: function
mapcanfnlists(one or more) => list
Argument description:
fn function that takes as many arguments as there are lists
lists lists which elements are processed in parallel

MAPCAN applies function FN to elements of lists with same index. Each application result is concatenated into resulting list. See MAPCAR.

(mapcan (lambda (x) (list (+ x 10) 'x)) '(1 2 3 4)) => (11 X 12 X 13 X 14 X)
(mapcan #'list '(a b c d)) => (A B C D)
(mapcan (lambda (x) (if (> x 0) (list x) nil)) '(-4 6 -23 1 0 12 )) => (6 1 12)
Function indexFull documentation for mapcan (HyperSpec)