drop_while


drop_while(p, xs) 
      

Return the suffix of the sequence xs remaining after removing elements that satisfy the predicate p.

Examples:


drop_while(is_positive, [1, 2, 3, -4, 5])
// [-4, 5]

function ints(n) n:~ints(n+1)
let s = ints(10)
take(3, drop_while(is_even, s))
// [11, 12, 13]
      

Also see:

drop
take_while
filter


Core Module Index | Contents