effect-io-ai

Package: effect
Module: Chunk

Chunk.splitNonEmptyAt

Splits a NonEmptyChunk into two segments, with the first segment containing a maximum of n elements. The value of n must be >= 1.

Signature

declare const splitNonEmptyAt: { (n: number): <A>(self: NonEmptyChunk<A>) => [beforeIndex: NonEmptyChunk<A>, fromIndex: Chunk<A>]; <A>(self: NonEmptyChunk<A>, n: number): [beforeIndex: NonEmptyChunk<A>, fromIndex: Chunk<A>]; }

Source

Since v2.0.0