chickadee » transducers » collect-reverse-list

collect-list #!optional (sentinel '())procedure
collect-reverse-list #!optional (sentinel '())procedure

Collectors that collect all items through a transducer into a list (or a reversed list).

 
(import transducers)

(transduce list-fold
           values
           (collect-list)
           (list 1 2 3))

; => (1 2 3)

(transduce list-fold
           values
           (collect-reverse-list)
           (list 1 2 3))

; => (3 2 1)