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

Zipping iterators #155

Open
lukaszcz opened this issue Dec 20, 2024 · 0 comments
Open

Zipping iterators #155

lukaszcz opened this issue Dec 20, 2024 · 0 comments
Labels
enhancement New feature or request proposal

Comments

@lukaszcz
Copy link
Contributor

We should have iterators for2, map2, etc., which are equivalent to for, map, etc., on zipped lists / data structures.

For example,

for2 (acc := a) (x in lst1; y in lst2) {
  f acc x y
}

would be equivalent to

for (acc := a) (x, y in zip lst1 lst2) {
  f acc x y
}

The first is better both for readability / understandability for newcomers and efficiency (no intermediate list created).

@lukaszcz lukaszcz added enhancement New feature or request proposal labels Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request proposal
Projects
None yet
Development

No branches or pull requests

1 participant