Skip to content

Instantly share code, notes, and snippets.

@minrwhite
Last active September 10, 2015 11:58
Show Gist options
  • Save minrwhite/0d39866edf001735ae46 to your computer and use it in GitHub Desktop.
Save minrwhite/0d39866edf001735ae46 to your computer and use it in GitHub Desktop.
Run to cursor
(function () {
var a = function *coroutine() {
yield 'a';
yield 'b';
yield 'c';
};
var b = function useCoroutine(generator) {
var a = generator.next().value;
var b = generator.next().value;
var c = generator.next().value;
};
b(a());
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment