Skip to content

Instantly share code, notes, and snippets.

@mattpodwysocki
Created March 20, 2015 18:48
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 mattpodwysocki/9540c8b3cf674b0ca070 to your computer and use it in GitHub Desktop.
Save mattpodwysocki/9540c8b3cf674b0ca070 to your computer and use it in GitHub Desktop.
interface Iterable<T> {
[Symbol.iterator]() : Iterator<T>
}
interface Iterator<T> {
[Symbol.iterator]() : Iterator<T>
next() : IteratorResult<T>
}
interface IteratorResult<T> {
value: T
done: boolean
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment