Last active
August 29, 2015 14:05
-
-
Save brianburridge/fe44e9ff3c45eb808708 to your computer and use it in GitHub Desktop.
BlooP function: Two-to-the-three-to-the...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DEFINE PROCEDURE: "TWO-TO-THE-THREE-TO-THE" [N]: | |
BLOCK 0: BEGIN | |
CELL(0) <= 1; | |
LOOP N TIMES: | |
BLOCK 1: BEGIN | |
CELL(0) <= 3 X CELL(0); | |
BLOCK 1: END; | |
CELL(1) <= 1; | |
LOOP CELL(0) TIMES: | |
BLOCK 2: BEGIN | |
CELL(1) <= 2 X CELL(1); | |
BLOCK 2: END; | |
OUTPUT <= CELL(1); | |
BLOCK 0: END. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment