I've found I needed this in a few places. You can already do it by iterating over std.range:
[for i, v in xs.enumerate(): ...]
is equivalent to
[
for i in std.range(0, xs.len()):
let v = xs[i];
...
]
but having it built-in is just slightly more convenient. It's a bit of a shame that we have to construct the entire dict just to iterate over it, but the focus of RCL right now is not performance.
[x] Ensure documentation is up to date.
[x] Ensure new code has test coverage.
[x] Ensure the fuzzer can discover interesting inputs.
I've found I needed this in a few places. You can already do it by iterating over std.range:
is equivalent to
but having it built-in is just slightly more convenient. It's a bit of a shame that we have to construct the entire dict just to iterate over it, but the focus of RCL right now is not performance.