Logo (source code)

= Logo
{c}

<Logo> is a <programming language> with procedures, lists and interactive evaluation, often used to make algorithmic ideas visible through <turtle graphics>. The turtle has a position and heading; motion commands can draw a line while changing that state. For example, `repeat 4 [forward 100 right 90]` draws a square and returns to the initial heading. Each turn is an exterior angle, so a regular $n$-gon uses turns of $360/n$ degrees.<Berkeley Logo 6.2 User Manual by Brian Harvey>[Graphics and Control Structures, FORWARD, RIGHT and REPEAT]{ref}

A named procedure can package this <machine instruction>[instruction] pattern and accept a side length as a parameter. Repeated calls and recursive procedures then produce more elaborate drawings without storing every line explicitly. The language also manipulates words and lists; turtle drawing is a useful experimental interface for studying programs, rather than the entire language.