35 lines
625 B
Plaintext
35 lines
625 B
Plaintext
(* TEST: [-asc -tc -cg -ir] *)
|
|
|
|
#include "std.alpha"
|
|
|
|
|
|
type M : string -> integer
|
|
function entry : M
|
|
|
|
type fib: integer -> integer
|
|
function Fib : fib
|
|
|
|
Fib(i) := {
|
|
[ Boolean: a ; Boolean: b ; Boolean: c]
|
|
if( i = 0 ) then {
|
|
return 7;
|
|
} else {
|
|
i := i;
|
|
}
|
|
b := b | (a & c);
|
|
b := 2 < 3;
|
|
if(i = 1) then {
|
|
return 1;
|
|
} else {
|
|
return i + Fib(i - 1);
|
|
}
|
|
}
|
|
|
|
entry (arg) := {
|
|
[ integer: x; integer: y ]
|
|
x := 2;
|
|
x := Fib(2);
|
|
y := printInteger(Fib(2));
|
|
return 1;
|
|
}
|