Skip to content
Snippets Groups Projects
matrice.lus 403 B
const n = 2 ;
const m = 3 ;

type T_fibo = int^2;

node fibo(accu_in : T_fibo) returns (accu_out : T_fibo; elt : int);
let
  accu_out = [accu_in[0]+accu_in[1], accu_in[0]];
  elt = accu_in[0]+accu_in[1];
tel

node matrice ( a : int ) returns ( sum: int; bid: T_fibo; T: int^m^n); 
let 
	bid, T = fill << fill << fibo ; m >> ; n >> ([a, a]);	
	sum = red << red <<node plus ; m >> ; n >> (0, T); 
tel