drop


drop(n, xs) 
      

Return a new sequence with the first n elements removed from the sequence xs.

Examples:


drop(3, [1, 2, 3, 4, 5])
// [4, 5]

drop(30, [1, 2, 3, 4, 5])
// []

drop(0, [1, 2, 3, 4, 5])
// [1, 2, 3, 4, 5]

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

function ints(n) n:~ints(n+1)
let s = ints(10)
take(3, drop(10, s))
// [20, 21, 22]
      

Also see:

take
drop_while
filter


Core Module Index | Contents