MCPcopy
hub / github.com/Effect-TS/effect / unappend

Function unappend

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

Source from the content-addressed store, hash-verified

667 * @since 2.0.0
668 */
669export const unappend = <A>(
670 self: NonEmptyReadonlyArray<A>
671): [arrayWithoutLastElement: Array<A>, lastElement: A] => [initNonEmpty(self), lastNonEmpty(self)]
672
673/**
674 * Get the first element of a `ReadonlyArray`, or `None` if the `ReadonlyArray` is empty.

Callers

nothing calls this directly

Calls 2

initNonEmptyFunction · 0.85
lastNonEmptyFunction · 0.85

Tested by

no test coverage detected