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

Function parallel

packages/effect/test/utils/cause.ts:26–30  ·  view source on GitHub ↗
(n: number)

Source from the content-addressed store, hash-verified

24 }
25
26 const parallel = (n: number): fc.Arbitrary<Cause.Cause<E>> => {
27 return fc.integer({ min: 1, max: n - 1 }).chain((i) =>
28 causesN(i).chain((left) => causesN(n - i).map((right) => Cause.parallel(left, right)))
29 )
30 }
31
32 const causesN = (n: number): fc.Arbitrary<Cause.Cause<E>> => {
33 if (n === 1) {

Callers 1

causesNFunction · 0.70

Calls 3

causesNFunction · 0.85
integerMethod · 0.80
mapMethod · 0.65

Tested by

no test coverage detected