Skip to content
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

Add support for Enumerators #47

Open
jtoman opened this issue Oct 2, 2012 · 1 comment
Open

Add support for Enumerators #47

jtoman opened this issue Oct 2, 2012 · 1 comment

Comments

@jtoman
Copy link
Member

jtoman commented Oct 2, 2012

A lot of our type signatures lose their expressiveness because we only support plain Enumerators. We should add support for Enumerators that are parameterized over a type. So Array#each called with no arguments should yield a Enumerator

This should be relatively straightforward, although figuring out how to do type inference on the contents of an Enumerator might be a little tricky.

@jtoman
Copy link
Member Author

jtoman commented Oct 19, 2012

As an update, we've decided that enumerators are basically not inferenceable. That is, they can only be passed to positions where their type is required (such as foo: (Enumerator)) if they have been annotated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant