import { dropWhile } from "https://deno.land/x/fae@v1.1.1/mod.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'