14 lines
242 B
Text
14 lines
242 B
Text
![]() |
node cross<<l:int>>(x:int) returns (y:int; c:bool)
|
||
|
let
|
||
|
c = x = l;
|
||
|
y = x when c;
|
||
|
tel
|
||
|
|
||
|
node main(x:int) returns (z:int)
|
||
|
var y,t : int; c : bool;
|
||
|
let
|
||
|
y = 0 fby (y+1);
|
||
|
(t,c) = cross<<4>>(x);
|
||
|
z = merge c (true -> y + t) (false -> 0)
|
||
|
tel
|