heptagon/test/good/itfusion.ept
Gwenal Delaval 87f359a6fd Added main to several tests
Added main to tests
Added dependency statics -> statics2 in scripts
2012-07-17 17:57:04 +02:00

29 lines
451 B
Text

const n:int = 42
fun inc(a:int) returns (o:int)
let
o = a + 1;
tel
fun f1(a:int^n) returns (o:int^n)
let
o = map<<n>> inc (map<<n>> inc (a));
tel
fun f2(a,b:int^n) returns (o:int^n)
let
o = map<<n>> (+) (map<<n>> inc (b), map<<n>> inc (a));
tel
fun f3(a,b:int^n) returns (o:int^n)
let
o = map<<n>> (+) (b, map<<n>> inc (a));
tel
node main() returns (o:int^n)
var t1,t2:int^n;
let
t1 = f1 (1^n);
t2 = f2(t1, 2^n);
o = f3(t1,t2);
tel