effect-io-ai

Package: effect
Module: Array

Array.dropWhile

Remove the longest initial subarray for which all element satisfy the specified predicate, creating a new Array.

Example

import { Array } from "effect"

const result = Array.dropWhile([1, 2, 3, 4, 5], x => x < 4)
console.log(result) // [4, 5]

Signature

declare const dropWhile: { <A>(predicate: (a: NoInfer<A>, i: number) => boolean): (self: Iterable<A>) => Array<A>; <A>(self: Iterable<A>, predicate: (a: A, i: number) => boolean): Array<A>; }

Source

Since v2.0.0