-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Summary
Extend for to support multiple bindings and multiple iterables with zip semantics.
Proposed Syntax
for a, b in xs, ys {
print(a, b);
}
Semantics
- N bindings + N iterables, positionally matched
- Iteration stops at the shortest iterable
- Body scope includes all bound variables
Scope
- Parser/type-checker/runtime support for multi-binding + multi-iterable form
- Type inference per binding from corresponding iterable element type
Out of Scope
- Destructuring bindings
- Range/index sugar (tracked separately)
Acceptance Criteria
for a, b in [1,2], [\"x\",\"y\"] { ... }works- Stops at shortest iterable when lengths differ
- Type errors for binding/iterable arity mismatch
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels