It is said that a process or procedure is recursive if a step on it is the process itself.
For example you can say that sorting a list is finding the first element, moving it apart, and sorting the remaining list.
In roboZZle a function is recursive if it calls itself. For example F1 is recursive if it contains the command
There are two basic uses for recursion in robZZle, one is making loops and the other one, more complex, is memorizing things.
To make a loop you usualy place the code that needs to be repeated in the begining of a function, followed by the recursive call.
Go straight forever:
Go straight while blue:
Go straight until blue:
Go straight but turn right on red tiles:
When the recursive call is conditional (colored) the condition is called stop condition. When the stop condition is not satisfied the call returns, and the code after the recursive call is executed for every recursive call executed. This may be confusing at first but very useful as we will see later.