Project

General

Profile

Download (259 Bytes) Statistics
| Branch: | Tag: | Revision:
1

    
2
type choice = enum { On, Off };
3

    
4
node clocks8 (x:int) returns (e:int)
5
var c:choice clock; a,b1,b2,d : int;
6
let
7
  a = 2*x;
8
  b1 = a + 1 when On(c);
9
  b2 = a - 1 when Off(c);
10
  c = if 0=x then Off else On;
11
  d = merge c (On -> b1) (Off -> b2);
12
  e = d/2;
13
tel
14

    
(18-18/25)