define turnright:
do 3:
turnleft
define follow_right_wall:
if right_is_clear:
turnright
move
elif front_is_clear:
move
else:
turnleft
while not_next_to_a_beeper:
follow_right_wall
turnoff
See also: SyntacticallySignificantWhitespaceConsideredHarmful