Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
func drop<S: SequenceType, T where S.Generator.Element == T>(sequence: S, count: Int) -> GeneratorOf<T> {
var generator = sequence.generate()
for _ in 0..<count {
generator.next()
}
return GeneratorOf<T>(generator)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment