Package: effect
Module: Array
Removes the first n elements, creating a new array.
When to use
Use to keep the suffix of an iterable after skipping a fixed number of leading elements.
Details
n is clamped to [0, length]. When n <= 0, this returns a copy of the
full array.
Example (Dropping from the start)
import { Array } from "effect"
console.log(Array.drop([1, 2, 3, 4, 5], 2)) // [3, 4, 5]
See
dropRight for removing a fixed number of elements from the enddropWhile for removing a prefix based on a predicate instead of a fixed counttake for keeping a fixed number of elements from the startSignature
declare const drop: { (n: number): <A>(self: Iterable<A>) => Array<A>; <A>(self: Iterable<A>, n: number): Array<A>; }
Since v2.0.0