-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fa44636
commit 0f49a22
Showing
3 changed files
with
54 additions
and
54 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
function fib int -> int do | ||
if dup 2 < do | ||
ret | ||
else | ||
dup 1 - fib swap 2 - fib + ret | ||
. | ||
. | ||
using io | ||
|
||
function main do | ||
30 fib print | ||
. | ||
fn fib int -> int ( | ||
if dup 2 < ( | ||
ret | ||
else | ||
dup 1 - fib swap 2 - fib + ret | ||
) | ||
) | ||
|
||
fn main ( | ||
30 fib println | ||
) |