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

Function makeTArray

packages/effect/test/TArray.test.ts:25–26  ·  view source on GitHub ↗
(length: number, value: A)

Source from the content-addressed store, hash-verified

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))
27
28const valuesOf = <A>(array: TArray.TArray<A>): STM.STM<Array<A>> =>
29 pipe(array, TArray.reduce<Array<A>, A>([], (acc, a) => [...acc, a]))

Callers 1

TArray.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…