Liking cljdoc? Tell your friends :D

criterium.transducer


cross-mapclj

(cross-map f)

Return a transducer for cross-type reductions with object accumulators.

Use when the map function converts between primitive types and the accumulator is an object (array, collection, etc.).

For double source → long element → object accumulator: f must be IFn$DL (double → long) rf must be IFn$OLO (Object, long → Object) Returns ODO transducer wrapper

For long source → double element → object accumulator: f must be IFn$LD (long → double) rf must be IFn$ODO (Object, double → Object) Returns OLO transducer wrapper

Return a transducer for cross-type reductions with object accumulators.

Use when the map function converts between primitive types and the
accumulator is an object (array, collection, etc.).

For double source → long element → object accumulator:
  f must be IFn$DL (double → long)
  rf must be IFn$OLO (Object, long → Object)
  Returns ODO transducer wrapper

For long source → double element → object accumulator:
  f must be IFn$LD (long → double)
  rf must be IFn$ODO (Object, double → Object)
  Returns OLO transducer wrapper
sourceraw docstring

filterclj

(filter pred)

Return a transducer that filters primitive elements with pred.

Return a transducer that filters primitive elements with pred.
sourceraw docstring

intocljmacro

(into target rf source)
source

mapclj

(map f)

Return a transducer that applies f to each primitive element.

Supports same-type reductions (long→long, double→double) and cross-type reductions (long→double, double→long) when the mapping function produces the appropriate output type.

For cross-type reductions:

  • long source → double accumulator: f must be IFn$LD (long→double)
  • double source → long accumulator: f must be IFn$DL (double→long)
Return a transducer that applies f to each primitive element.

Supports same-type reductions (long→long, double→double) and cross-type
reductions (long→double, double→long) when the mapping function
produces the appropriate output type.

For cross-type reductions:
- long source → double accumulator: f must be IFn$LD (long→double)
- double source → long accumulator: f must be IFn$DL (double→long)
sourceraw docstring

prim-maxclj

Reducing function that computes maximum of primitive values.

Reducing function that computes maximum of primitive values.
sourceraw docstring

prim-minclj

Reducing function that computes minimum of primitive values.

Reducing function that computes minimum of primitive values.
sourceraw docstring

prim-set-atclj

(prim-set-at)

Create a reducing function that sets array elements sequentially.

Create a reducing function that sets array elements sequentially.
sourceraw docstring

prim-sumclj

Reducing function that sums primitive values.

Reducing function that sums primitive values.
sourceraw docstring

rangecljmacro

(range start end)
(range start end step)
source

reducecljmacro

(reduce rf init source)
source

transducecljmacro

(transduce xform rf init source)
source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close