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

Function arrayUpdate

packages/effect/src/internal/hashMap/array.ts:2–11  ·  view source on GitHub ↗
(mutate: boolean, at: number, v: A, arr: Array<A>)

Source from the content-addressed store, hash-verified

1/** @internal */
2export function arrayUpdate<A>(mutate: boolean, at: number, v: A, arr: Array<A>) {
3 let out = arr
4 if (!mutate) {
5 const len = arr.length
6 out = new Array(len)
7 for (let i = 0; i < len; ++i) out[i] = arr[i]!
8 }
9 out[at] = v
10 return out
11}
12
13/** @internal */
14export function arraySpliceOut<A>(mutate: boolean, at: number, arr: Array<A>) {

Callers 3

updateCollisionListMethod · 0.85
modifyMethod · 0.85
modifyMethod · 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…