until

[syntax] while test expr1 expr2 ...

[syntax] until test expr1 expr2 ...

STk, STklos: evaluates the expression(s) while/until test evaluates true.

[syntax] while test => var expr1 expr2 ...

[syntax] while test guard => var expr1 expr2 ...

[syntax] until test guard => var expr1 expr2 ...

Gauche supports some variations besides the basic syntax as STklos.

while test => var

Binds the result of test to var for each iteration and evaluates expressions as far as test evaluates to a true value.

while test guard => var

Evaluates test and applies guard to the result, and repeat only if guard returns a true value. var is bound to the result of ''test'.

until test guard => var

Evaluates test and applies guard to the result, and repeat only if guard returns #f. var is bound to the result of ''test'.

[syntax] while* test expr1 expr2 ...

Chicken: Third-party library eggs:miscmacros supports the basic syntax as STklos, and anaphoric variation while*.

while* test expr ...

Evaluates expr ... with variable it bound to the evaluation of test.