Skip to content

Combinable

Combinable<A> = object

Defined in: Core/Combinable.ts:14

A type that can combine two values of type A into one, with a neutral starting value. empty is the identity: combine(empty)(a) === a and combine(a)(empty) === a. combine(b)(a) appends b onto aa is the accumulated value, b is the new element.

pipe(["hello", ", ", "world"], Combinable.fold(Combinable.string)); // "hello, world"
pipe([1, 2, 3, 4, 5], Combinable.fold(Combinable.sum));            // 15

A

readonly combine: (b) => (a) => A

Defined in: Core/Combinable.ts:14

A

(a) => A


readonly empty: A

Defined in: Core/Combinable.ts:14