|
|
|
|
|
by pfalcon
1999 days ago
|
|
> while (it.next()) |item| { Talk about confusing, implicit syntax of Zig - there's no connection between "it.next()" and "|item|". It's implicit and you need to make it up. Compare that to other languages: "for item in it" or "while (item = it.next())". |
|
The for loop payload syntax, where you can also give a name to the counter, is the only weirdness with it.