Skip to content

Zipping iterators #155

@lukaszcz

Description

@lukaszcz

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions