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

enumeration of iterables #15

Open
natebrennand opened this issue Oct 28, 2014 · 1 comment
Open

enumeration of iterables #15

natebrennand opened this issue Oct 28, 2014 · 1 comment
Labels

Comments

@natebrennand
Copy link
Contributor

Proposal:

when iterating using a for block, catching two variables turns it into an enumeration. When iterating over a dictionary, (key, value) pairs are yielded.

for (/* type */ /* id */ in /* list expr */) {
    // statements
}

// and also for lists:
for (Int /* id */, /* type */ /* id */ in /* list expr */) {
    // statements
}

// and also for dictionaries:
for (/* key type */ /* id */, /* value type */ /* id */ in /* dict */) {
    // statements
}
@brishin
Copy link

brishin commented Oct 28, 2014

Sounds good to me

@brishin brishin mentioned this issue Nov 20, 2014
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants