Created
December 1, 2012 18:44
-
-
Save hashmal/4183955 to your computer and use it in GitHub Desktop.
Maize Demo
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
program main -> X is | |
0x08 fibonacci | |
end | |
-- Renvoie (R) le Nieme element de la suite de fibonacci. | |
-- PRECONDITION: N >= 0 | |
program N fibonacci -> R is | |
take N 0x00 0x01 restore N | |
label W dup 0x00 gt then | |
take N dup take fib_el | |
swap restore fib_el sum | |
restore N 0xFFFFFFFFFFFFFFFF sum | |
goto W | |
end | |
rem rem | |
end | |
program X Y swap -> Y X is | |
take Y take X | |
restore X restore Y | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment