MCPcopy Index your code
hub / github.com/Effect-TS/effect / eitherArbitrary

Function eitherArbitrary

packages/effect/src/Schema.ts:7383–7391  ·  view source on GitHub ↗
(
  right: LazyArbitrary<R>,
  left: LazyArbitrary<L>
)

Source from the content-addressed store, hash-verified

7381 input._tag === "Left" ? either_.left(input.left) : either_.right(input.right)
7382
7383const eitherArbitrary = <R, L>(
7384 right: LazyArbitrary<R>,
7385 left: LazyArbitrary<L>
7386): LazyArbitrary<either_.Either<R, L>> =>
7387(fc) =>
7388 fc.oneof(
7389 fc.record({ _tag: fc.constant("Left" as const), left: left(fc) }),
7390 fc.record({ _tag: fc.constant("Right" as const), right: right(fc) })
7391 ).map(eitherDecode)
7392
7393const eitherPretty = <R, L>(
7394 right: pretty_.Pretty<R>,

Callers

nothing calls this directly

Calls 3

mapMethod · 0.65
leftFunction · 0.50
rightFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…