Created
April 1, 2015 05:55
-
-
Save Higgs1/0a08c98af77a2cfd7b95 to your computer and use it in GitHub Desktop.
CoffeeScript "next" function (Python-like)
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
next = (x) -> | |
x.next().value |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pulls the next value from a generator, or null if generator is done.
Use with the iter function for maximum Python-ness.