We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We should have iterators for2, map2, etc., which are equivalent to for, map, etc., on zipped lists / data structures.
for2
map2
for
map
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).
The text was updated successfully, but these errors were encountered:
On a fresh reading of the proposed syntax I would think that y in lst2 is a nested loop rather than zipped.
y in lst2
Sorry, something went wrong.
Would
for (acc := a) (x, y in lst1, lst2) { ... }
be better?
But then maybe it's not so different from using zip.
zip
No branches or pull requests
We should have iterators
for2
,map2
, etc., which are equivalent tofor
,map
, etc., on zipped lists / data structures.For example,
would be equivalent to
The first is better both for readability / understandability for newcomers and efficiency (no intermediate list created).
The text was updated successfully, but these errors were encountered: