1 min readDec 18, 2019
Hi! Loops are usually done using recursion in functional languages, as well as using map. For example:
fn loop i:
if i < 10:
i + 1 -> loop
0 -> loop
We have unlimited recursion in Clio, this is done using lazy evaluation. The above function loops from 0 to 10. It can also be written using maps:
[:10] -> fn i:
i -> print