Package: effect
Module: Array
Returns all elements except the last of a NonEmptyReadonlyArray.
When to use
Use to get all elements before the last when the array is known to be non-empty.
Example (Getting init of a non-empty array)
import { Array } from "effect"
console.log(Array.initNonEmpty([1, 2, 3, 4])) // [1, 2, 3]
See
init — safe version for possibly-empty arraystailNonEmpty — all elements except the firstSignature
declare const initNonEmpty: <A>(self: NonEmptyReadonlyArray<A>) => Array<A>
Since v2.0.0