-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better support for ES6 Iterators #68
Comments
0164a55 Adds Iterator methods to Vector, Map, Set, OrderedMap |
049eff1 Adds ES6 Symbol.iterator polyfill |
Hi, I'm not sure it's the right place to ask/tell but I've tried to use Thanks. |
Hey Joseph, what version are you using?— On Fri, Aug 29, 2014 at 1:51 AM, Joseph Silvestre
|
Sorry, I've tried the latest one, 2.0.16 |
is there any way to create a lazy Sequence directly from an ES6 generator? |
Not yet, but I have that on my short list!— On Mon, Sep 22, 2014 at 8:54 PM, voodoohop notifications@github.com
|
As of v2.3.0, all Sequences can be iterated and all collections can be constructed from an Iterator or Iterable. |
Should the typings of [Symbol.iterator](): Iterator<T>; I'm not sure this is the right way for 2 reasons:
|
You hit the nail on the head here. This is the real issue with making the base class iterable. Consider the following function:
What type belongs in |
It seems then that |
As spec'd (kinda) in:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/The_Iterator_protocol
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/iterable
http://wiki.ecmascript.org/doku.php?id=harmony:iterators
http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts
The text was updated successfully, but these errors were encountered: