- This assignment concerns turtle graphics, which is a very simple language for con-
trolling a virtual robot that has a pen. The robot moves around on an unbounded
rectangular grid, staying on integer coordinates. It can be facing north, west,
south, or east; it can turn by 90. When it moves, it moves by distance 1 in the
direction it is facing. The robot also has a pen, which can be `up' or `down'; if the
robot moves while the pen is down, it draws a line from its old position to its new
position.
The robot is controlled via a little language of robot programs, which can be
represented as follows:
data Prog Move Prog
j Turn Prog
j SwapPen Prog
j Stop