chickadee » srfi-1 » append-map!

append-map f clist_1 clist_2 ...procedure
append-map! f clist_1 clist_2 ...procedure

Equivalent to

(apply append (map F CLIST_1 CLIST_2 ...))


(apply append! (map F CLIST_1 CLIST_2 ...))

Map F over the elements of the lists, just as in the map function. However, the results of the applications are appended together to make the final result. append-map uses append to append the results together; append-map! uses append!.

The dynamic order in which the various applications of F are made is not specified.


(append-map! (lambda (x) (list x (- x))) '(1 3 8))
    => (1 -1 3 -3 8 -8)

At least one of the list arguments must be finite.