MCPcopy Create free account
hub / github.com/Effect-TS/effect / reduceEffect

Function reduceEffect

packages/effect/src/Sink.ts:1497–1500  ·  view source on GitHub ↗
(
  initial: LazyArg<S>,
  f: (s: S, input: In) => Effect.Effect<S, E, R>
)

Source from the content-addressed store, hash-verified

1495 * @since 4.0.0
1496 */
1497export const reduceEffect = <S, In, E, R>(
1498 initial: LazyArg<S>,
1499 f: (s: S, input: In) => Effect.Effect<S, E, R>
1500): Sink<S, In, never, E, R> => reduceWhileEffect(initial, constTrue, f) as any
1501
1502const head_ = reduceWhile(Option.none<unknown>, Option.isNone, (_, in_) => Option.some(in_))
1503

Callers

nothing calls this directly

Calls 1

reduceWhileEffectFunction · 0.85

Tested by

no test coverage detected