Hyperlinkv0.8.0-beta.28

Boolean

Boolean.ReducerAndconsteffect/Boolean.ts:461
Reducer.Reducer<boolean>

Reducer for combining booleans using AND.

When to use

Use to require every accumulated boolean to be true through APIs that consume a Reducer.

Details

The initialValue is true, so combineAll([]) returns true.

Gotchas

combineAll uses the default left-to-right Reducer.make fold and does not short-circuit on false.

Source effect/Boolean.ts:4611 lines
export const ReducerAnd: Reducer.Reducer<boolean> = Reducer.make((a, b) => a && b, true)