Created
April 1, 2015 05:49
-
-
Save Higgs1/3e2e4c0a3e1d547b5bd5 to your computer and use it in GitHub Desktop.
CoffeeScript "iter" 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
iter = (x) -> | |
yield from x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Converts an Iterable (String, Array, TypedArray, Map, Set, and objects with a "@@iterator"() method; but still not Array-likes - bleh) or another Generator into a Generator. Useful for iterating over various types of things.