Our next less-well-known Lisp function is map. This function works like the more-familiar mapcar, but rather than necessarily returning a list, returns a sequence of the type chosen in the invocation.
Adapting the example in the CLHS:
CL-USER> (map 'string #'(lambda (x y) (char "01234567890ABCDEF" (mod (+ x y) 16))) '(1 2 3 4) '(7 8 9 10)) "80BD" CL-USER> (map 'vector #'(lambda (x y) (char "01234567890ABCDEF" (mod (+ x y) 16))) '(1 2 3 4) '(7 8 9 10)) #(#\8 #\0 #\B #\D) CL-USER> (map 'list #'(lambda (x y) (char "01234567890ABCDEF" (mod (+ x y) 16))) '(1 2 3 4) '(7 8 9 10)) (#\8 #\0 #\B #\D) CL-USER> (mapcar #'(lambda (x y) (char "01234567890ABCDEF" (mod (+ x y) 16))) '(1 2 3 4) '(7 8 9 10)) (#\8 #\0 #\B #\D)