Skip to content

removeAt

removeAt(index): <A>(data) => readonly A[]

Defined in: Utils/Arr.ts:565

Returns a new array with the element at index removed. Returns the original array unchanged if index is out of bounds.

number

<A>(data): readonly A[]

A

readonly A[]

readonly A[]

pipe([1, 2, 3], Arr.removeAt(1)); // [1, 3]
pipe([1, 2, 3], Arr.removeAt(0)); // [2, 3]
pipe([1, 2, 3], Arr.removeAt(5)); // [1, 2, 3]