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

Function cond

packages/effect/test/Pool.test.ts:173–173  ·  view source on GitHub ↗
(i: number)

Source from the content-addressed store, hash-verified

171 it.effect("compositional retry", () =>
172 Effect.gen(function*() {
173 const cond = (i: number) => (i <= 10 ? Effect.fail(i) : Effect.succeed(i))
174 const count = yield* Ref.make(0)
175 const get = Effect.acquireRelease(
176 Ref.updateAndGet(count, (n) => n + 1).pipe(

Callers

nothing calls this directly

Calls 2

failMethod · 0.45
succeedMethod · 0.45

Tested by

no test coverage detected