Fuzion Logo
flang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

transducers

🌌transducers

transducers map one reducing function to another

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]

left-to-right composition of transducers

a transducer filtering values based on evaluation of predicate

a transducer mappping values from T to U