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

Function reduceEffect

packages/effect/src/Sink.ts:1426–1429  ·  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

1424 * @since 4.0.0
1425 */
1426export const reduceEffect = <S, In, E, R>(
1427 initial: LazyArg<S>,
1428 f: (s: S, input: In) => Effect.Effect<S, E, R>
1429): Sink<S, In, never, E, R> => reduceWhileEffect(initial, constTrue, f) as any
1430
1431const head_ = reduceWhile(Option.none<unknown>, Option.isNone, (_, in_) => Option.some(in_))
1432

Callers

nothing calls this directly

Calls 1

reduceWhileEffectFunction · 0.85

Tested by

no test coverage detected