Hyperlinkv0.8.0-beta.28

Sink

Sink.everyconsteffect/Sink.ts:824
<In>(predicate: Predicate<In>): Sink<boolean, In, In>

A sink that returns whether all elements satisfy the specified predicate.

When to use

Use to reduce a stream to a boolean that is true only when every input satisfies a pure predicate.

constructorssome
Source effect/Sink.ts:8246 lines
export const every = <In>(predicate: Predicate<In>): Sink<boolean, In, In> =>
  fold(
    constTrue,
    identity,
    (_, a) => Effect.succeed(predicate(a))
  )