Skip to content

Instantly share code, notes, and snippets.

@michaeleisel
Last active March 18, 2019 16:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaeleisel/921fbe5e1eade77d769839379cbcda72 to your computer and use it in GitHub Desktop.
Save michaeleisel/921fbe5e1eade77d769839379cbcda72 to your computer and use it in GitHub Desktop.
func checkIteratorState<T: Sequence, T.Element: Equatable>(sequence: T) {
var iterator1 = sequence.makeIterator()
var iterator2 = sequence.makeIterator()
// test equality
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment