MCPcopy
hub / github.com/Effect-TS/effect / makeStairWithHoles

Function makeStairWithHoles

packages/effect/test/TArray.test.ts:22–23  ·  view source on GitHub ↗
(length: number)

Source from the content-addressed store, hash-verified

20 TArray.fromIterable(Array.from({ length }, (_, i) => i + 1))
21
22const makeStairWithHoles = (length: number): STM.STM<TArray.TArray<Option.Option<number>>> =>
23 TArray.fromIterable(Array.from({ length }, (_, i) => i % 3 === 0 ? Option.none() : Option.some(i)))
24
25const makeTArray = <A>(length: number, value: A): STM.STM<TArray.TArray<A>> =>
26 TArray.fromIterable(Array.from({ length }, () => value))

Callers 1

TArray.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected