summaryrefslogtreecommitdiff
path: root/examples/fib.int
blob: 11736d0d7b55a6658bfedc44674ab5b80e5880c7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
[dec wowow []]
[type test [(INT x) (INT y)]]
[def testest [] [test.y [test 3 10]]]
[def dec [n] [- n 1]]
[def inc [n] [+ n 1]]
[def ttt [x y] [test y x]]
[def ! [b] [if b 0 1]]
[def != [x y] [- x y]]
[def == [x y] [! [!= x y]]]
[def or [a b] [if a 1 b]]
[def fib [n] [debug_int [if [or [== n 0] [== n 1]] 1 [+ [fib [- n 1]] [fib [- n 2]]]]]]
[def inter_main [] [fib [test.y [ttt 10 10]]]]