Parallel computations based on a Fork-join model.

IFoldable

Available since version 1.0 (view source)

PROTOCOL with method -fold

A value protocol for foldable collections.

-fold

Available since version 1.0 (view source)

not referred automatically

Usage:
  • (-fold this reduce-fn pool n combinef reducef)

Type signature:
  • (Any ⨯ AnyFn ⨯ ForkJoinPool ⨯ Integer+ ⨯ AnyFn ⨯ AnyFn) → Any

Returns the reduction of this with reducef and with (combinef) as a starting value. Uses a potentially parallel reduce-combine strategy (dividing while length is greater than n, reducing divided chunks with reducef and combining partial results with combinef), with reduce-fn specifying the reduction function (e.g. reduce*). Uses forkjoin pool for the execution of tasks.

See also: IFoldable