Last active
September 10, 2015 11:58
-
-
Save minrwhite/0d39866edf001735ae46 to your computer and use it in GitHub Desktop.
Run to cursor
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
(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