Skip to main content
Module

x/fae/dropWhile.ts>dropWhile

A functional module for Deno inspired from Ramda.
Latest
variable dropWhile
import { dropWhile } from "https://deno.land/x/fae@v1.1.1/dropWhile.ts";

Returns a new list excluding the leading elements of a functor which satisfies predicate. Skips all the elements which on applied on predicate returns true. The new list starts with first false.

Acts as a transducer if a transformer is passed in place of functor

 const lteTwo = x => x <= 2
 Fae.dropWhile(lteTwo, [1, 2, 3, 4, 3, 2, 1]); //=> [3, 4, 3, 2, 1]
 Fae.dropWhile(x => x !== 't' , 'dispatch'); //=> 'tch'

type

DropWhile