Hyperlinkv0.8.0-beta.28

Sink

Sink.someconsteffect/Sink.ts:844
<In>(predicate: Predicate<In>): Sink<boolean, In, In>

A sink that returns whether an element satisfies the specified predicate.

When to use

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

constructorsevery
Source effect/Sink.ts:8446 lines
export const some = <In>(predicate: Predicate<In>): Sink<boolean, In, In> =>
  fold(
    constFalse,
    (b) => !b,
    (_, a) => Effect.succeed(predicate(a))
  )