Article wrapper
Callouts using co
:
- ①
This variable controls the loop. It is declared without an initial value, immediately after the
let
operand.- ②
Any number of additional local variables can be defined after the loop variable, just as they can in any other
let
expression.- ③
If you ever want the loop to end, you have to put some sort of a test in it.
- ④
This is the value that will be returned.
- ⑤
Note that you iterate the loop by using the loop variable as if it was a function name.
- ⑥
The arguments to this function are the values that you want the local variables declared in ② to have in the next iteration.