Use transducers like normal collection functions!
Use transducers like normal collection functions!
(=> coll & xforms-and-terminal)
Thread coll through xforms, returning value from terminal.
coll
is a collection.
xforms
are functions like (map first) and (filter even) that
return transducers.
terminal
is the last form in the =>
body. It takes %xform and %coll
as implicit parameters and can be used to generate the final value
once computation is complete.
Also see: transduce!
, sequence!
, and into!
.
Thread coll through xforms, returning value from terminal. `coll` is a collection. `xforms` are functions like (map first) and (filter even) that return transducers. `terminal` is the last form in the `=>` body. It takes %xform and %coll as implicit parameters and can be used to generate the final value once computation is complete. Also see: `transduce!`, `sequence!`, and `into!`.
(into! to)
Dispatches to into
.
Use inside =>
as a terminal.
Dispatches to `into`. Use inside `=>` as a terminal.
(sequence!)
Dispatches to sequence
.
Use inside =>
as a terminal.
Dispatches to `sequence`. Use inside `=>` as a terminal.
(transduce! f)
(transduce! f init)
Dispatches to transduce
.
Use inside =>
as a terminal.
Dispatches to `transduce`. Use inside `=>` as a terminal.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close