Recursion
may be defined as repetition. For example the procedure

TO
SQUARE
FD 50 RT 90 FD 50 RT 90 FD 50 RT 90 FD 50 RT 90
END

will
solve the problem of finding a way to draw a square in Logo. On the other hand,
the procedure

TO
SQUARE
REPEAT 4[RT 90 FD 50]
END

solves
the same problem without writing out the directions for drawing each side of the
square. Instead, it simply says "draw a side, four times."
Incidentally, this is called finite recursion, because we are counting to
a finite number. The procedure

TO
SQUARE
RT 90 FD 50
SQUARE
END

solves
the same problem with an infinite recursion. Recursion is an extremely
important characteristic of human problem solving and it is reflected in nearly
all computer languages.

Using the Repeat statement to draw regular polygons