☰
transducers
transducers
left-to-right composition of transducers
§filter(TA type, T type, predicate Unary bool transducers.filter.T) => Transducer transducers.filter.TA transducers.filter.T transducers.filter.T:Any
§filter(TA
type
, T type
, predicate Unary bool transducers.filter.T) =>
Transducer transducers.filter.TA transducers.filter.T transducers.filter.T:
Any a transducer filtering values based on evaluation of predicate
§map(TA type, T type, U type, mapper Unary transducers.map.U transducers.map.T) => Transducer transducers.map.TA transducers.map.U transducers.map.T:Any
§map(TA
type
, T type
, U type
, mapper Unary transducers.map.U transducers.map.T) =>
Transducer transducers.map.TA transducers.map.U transducers.map.T:
Any a transducer mappping values from T to U
see https://clojure.org/reference/transducers
for in depth information about transducers
usage example:
human(age i32) is
ages := map (Sequence i32) human i32 (x -> x.age)
gt_ten := filter (Sequence i32) i32 (x -> x > 10)
xf := ages ∘ gt_ten
say ([human(4), human(12), human(30)].into xf) # [12,30]