5.1. Recursion.   

A procedure or function which calls itself either directly or indirectly (A calls B which calls A, etc.)


integer function factorial(integer n);
begin
if
n=0 then factorial 1
else factorial factorial(n-1)*n;
end;

We can see in recursive function factorial that we have an if ... then ... else construct. This is typical of a recursive algorithm.