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

Function unappend

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

Source from the content-addressed store, hash-verified

1109 * @since 2.0.0
1110 */
1111export const unappend = <A>(
1112 self: NonEmptyReadonlyArray<A>
1113): [arrayWithoutLastElement: Array<A>, lastElement: A] => [initNonEmpty(self), lastNonEmpty(self)]
1114
1115/**
1116 * 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