Currently, only repeat (expr) is available for creating loops, which requires more manual code even for simple cases.
while and for loops could simplify this by providing higher-level constructs that are internally lowered to repeat, with additional logic executed before or after each iteration.
This would make common looping patterns easier to write while keeping the underlying implementation simple.
Currently, only
repeat (expr)is available for creating loops, which requires more manual code even for simple cases.whileandforloops could simplify this by providing higher-level constructs that are internally lowered torepeat, with additional logic executed before or after each iteration.This would make common looping patterns easier to write while keeping the underlying implementation simple.