lustrec / test / src / arrays_arnaud / generic3.lus @ 22fe1c93
History | View | Annotate | Download (378 Bytes)
1 |
const PI = 3; |
---|---|
2 |
|
3 |
imported node imp1(const m:int; a:int^(PI*m)) returns (c:int^m); |
4 |
|
5 |
imported node imp2(const n:int; a:int^n) returns (d:int^n); |
6 |
|
7 |
node base(const p:int; x:int^(PI*p)) returns (y:int^p) |
8 |
var z:int^(PI*p); |
9 |
let |
10 |
z = imp2(PI*p, x); |
11 |
y = imp1(p, z); |
12 |
tel |
13 |
|
14 |
node top(a:int) returns (y:int) |
15 |
var x; |
16 |
let |
17 |
x = [a,1,2,3,4,5,6,7,8,9,10,11,12,13,14]; |
18 |
y = base (5, x)[0]; |
19 |
tel |