Created
April 9, 2015 15:27
-
-
Save segiddins/45c19264457deb8ccc63 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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