17 lines
395 B
Text
17 lines
395 B
Text
|
node f(a : int) = (o : int)
|
||
|
var x : int; c : bool;
|
||
|
let
|
||
|
c = true fby false fby c;
|
||
|
x = 0 fby ((merge c a (x whenot c)) + 1);
|
||
|
o = x when c
|
||
|
tel
|
||
|
|
||
|
node g(a : int) = (o : int)
|
||
|
var x1, x2:int; c1, c2: bool;
|
||
|
let
|
||
|
c1 = true fby false fby c1;
|
||
|
c2 = true fby false fby c2;
|
||
|
x1 = 0 fby ((merge c1 a (x1 whenot c1)) + 1);
|
||
|
x2 = 0 fby ((merge c2 x1 (x2 whenot c2)) + 1);
|
||
|
o = x2 when c2 when c1;
|
||
|
tel
|