Package: effect
Module: Array
Splits a NonEmptyReadonlyArray into two segments, with the first segment containing a maximum of n elements.
The value of n must be >= 1.
Example
import { Array } from "effect"
const result = Array.splitNonEmptyAt(["a", "b", "c", "d", "e"], 3)
console.log(result) // [["a", "b", "c"], ["d", "e"]]
Signature
declare const splitNonEmptyAt: { (n: number): <A>(self: NonEmptyReadonlyArray<A>) => [beforeIndex: NonEmptyArray<A>, fromIndex: Array<A>]; <A>(self: NonEmptyReadonlyArray<A>, n: number): [beforeIndex: NonEmptyArray<A>, fromIndex: Array<A>]; }
Since v2.0.0