effect-io-ai

Package: effect
Module: Array

Array.tailNonEmpty

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]

See

Signature

declare const tailNonEmpty: <A>(self: NonEmptyReadonlyArray<A>) => Array<A>

Source

Since v2.0.0