MCPcopy Create free account
hub / github.com/Effect-TS/effect / initNonEmpty

Function initNonEmpty

packages/effect/src/Array.ts:1261–1261  ·  view source on GitHub ↗
(self: NonEmptyReadonlyArray<A>)

Source from the content-addressed store, hash-verified

1259 * @since 2.0.0
1260 */
1261export const initNonEmpty = <A>(self: NonEmptyReadonlyArray<A>): Array<A> => self.slice(0, -1)
1262
1263/**
1264 * Keeps the first `n` elements, creating a new array.

Callers 3

Array.tsFile · 0.85
unappendFunction · 0.85
initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected