beginning-of-program define-new-instruction turnright as begin iterate 3 times begin turnleft; end; end; define-new-instruction climb-stair as begin turnleft; move; turnright; move; end; define-new-instruction pickbeeper-if-present as begin if next-to-a-beeper then begin pickbeeper; end; end; beginning-of-execution iterate 3 times begin climb-stair; pickbeeper-if-present; end; turnoff; end-of-execution end-of-program