Hyperlinkv0.8.0-beta.28

Array

Array.tailNonEmptyconsteffect/Array.ts:1213
<A>(self: NonEmptyReadonlyArray<A>): Array<A>

Returns all elements except the first of a NonEmptyReadonlyArray.

When to use

Use to get all elements after the first when the array is known to be non-empty.

Example (Getting the tail of a non-empty array)

import { Array } from "effect"

console.log(Array.tailNonEmpty([1, 2, 3, 4])) // [2, 3, 4]
Source effect/Array.ts:12131 lines
export const tailNonEmpty = <A>(self: NonEmptyReadonlyArray<A>): Array<A> => self.slice(1)
Referenced by 6 symbols