chickadee » transducers » reverse-u16vector-fold

reverse-vector-fold f sentinel vecprocedure
reverse-u8vector-fold f sentinel vecprocedure
reverse-u16vector-fold f sentinel vecprocedure
reverse-u32vector-fold f sentinel vecprocedure
reverse-u64vector-fold f sentinel vecprocedure
reverse-s8vector-fold f sentinel vecprocedure
reverse-s16vector-fold f sentinel vecprocedure
reverse-s32vector-fold f sentinel vecprocedure
reverse-s64vector-fold f sentinel vecprocedure
reverse-f32vector-fold f sentinel vecprocedure
reverse-f64vector-fold f sentinel vecprocedure
reverse-c64vector-fold f sentinel vecprocedure
reverse-c128vector-fold f sentinel vecprocedure

A reverse fold operation over vectors. Behaves the same as the vector-fold equivalent except that it folds through vectors in reverse order. In effect these behave like a right fold instead of a left-fold as many of the folding operations in this module do.

 
(import transducers)

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

; => #(3 2 1)