Type alias Reducer<Item, Accumulator>

Reducer<Item, Accumulator>: Unary<Item, Unary<Accumulator, Accumulator>>

Reducer/Folder function.

Example

const array: ReadOnlyArray<number> = [1, 2, 3];
const reducer: Reducer<number, number> = item => accumulator => accumulator + item;

Type Parameters

  • Item

  • Accumulator