chickadee » transducers » collect-max

collect-max #!optional (sentinel -inf.0)procedure
collect-min #!optional (sentinel +inf.0)procedure

Collectors that collect either the maximum value or minimum value transduced over, respectively.

 
(import transducers)

(transduce list-fold
           values
           (collect-max)
           (list -999 0 999))

; => 999.0

(transduce list-fold
           values
           (collect-min)
           (list -999 0 999))

; => -999.0