drop

fun <T> Sequence<T>.drop(n: Int): Sequence<T>

Returns a sequence containing all elements except first n elements.

The operation is intermediate and stateless.

Samples

import samples.*
import kotlin.test.*
fun main() { 
   //sampleStart 
   val chars = ('a'..'z').toList()
assertPrints(chars.drop(23), "[x, y, z]")
assertPrints(chars.dropLast(23), "[a, b, c]")
assertPrints(chars.dropWhile { it < 'x' }, "[x, y, z]")
assertPrints(chars.dropLastWhile { it > 'c' }, "[a, b, c]") 
   //sampleEnd
}

Throws