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

Function makeStair

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

Source from the content-addressed store, hash-verified

17 TArray.fromIterable(Array.from({ length: blocks * length }, (_, i) => (i % length) + 1))
18
19const makeStair = (length: number): STM.STM<TArray.TArray<number>> =>
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)))

Callers 1

TArray.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected