BEGINNING-OF-PROGRAM
define-new-instruction turnright as
begin
turnleft;
turnleft;
turnleft
end;
define-new-instruction right-pivot as
begin
turnright;
move;
turnright;
move
end;
define-new-instruction left-pivot as
begin
turnleft;
move;
turnleft;
move
end;
define-new-instruction put-and-move as
begin
putbeeper;
move;
move
end;
BEGINNING-OF-EXECUTION
move;
turnleft;
put-and-move;
right-pivot;
put-and-move;
put-and-move;
left-pivot;
put-and-move;
put-and-move;
put-and-move;
right-pivot;
put-and-move;
put-and-move;
put-and-move;
put-and-move;
left-pivot;
move;
move;
move;
move;
turnleft;
turnoff
END-OF-EXECUTION
END-OF-PROGRAM