Skip to content

Instantly share code, notes, and snippets.

@brianburridge
Last active August 29, 2015 14:05
Show Gist options
  • Save brianburridge/fe44e9ff3c45eb808708 to your computer and use it in GitHub Desktop.
Save brianburridge/fe44e9ff3c45eb808708 to your computer and use it in GitHub Desktop.
BlooP function: Two-to-the-three-to-the...
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