Next: , Previous: Compared conditionals, Up: Comparison


5.3 Looping

C:

     while (thinking) run();
     
     for (int i = 0; i < 18; i++) run(i);

Python:

     while thinking: run()
     
     for i in range(18): run(i)

Enigma:

{!run; thinking ! clone = return;} ! loop;

0 = i;
{i ! run; i 1 ! add; i 18 ! equal = return;} ! loop;