Created
October 23, 2014 12:32
-
-
Save OdeToCode/1d010178a02a038ce9b5 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
| let range = function*(start, end){ | |
| let current = start; | |
| while(current < end){ | |
| let newValue = yield current; | |
| current = newValue ? newValue : current + 1; | |
| } | |
| }; | |
| let stuff = range(0,3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment