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

Function unappend

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

Source from the content-addressed store, hash-verified

1049 * @since 2.0.0
1050 */
1051export const unappend = <A>(
1052 self: NonEmptyReadonlyArray<A>
1053): [arrayWithoutLastElement: Array<A>, lastElement: A] => [initNonEmpty(self), lastNonEmpty(self)]
1054
1055/**
1056 * Returns the first element of an array safely wrapped in `Option.some`, or

Callers

nothing calls this directly

Calls 2

initNonEmptyFunction · 0.85
lastNonEmptyFunction · 0.85

Tested by

no test coverage detected