{==================================================================} {=== Two and three point function domains ===} {==================================================================} d3 a ::= D3 a; ;; if c t f = case c of True -> t; False -> f end; {=========================================} {=== 2 -> 2 functions ===} {=========================================} {=================================} f00 x = f00 x; {=================================} f01 x = x; {=================================} f11 x = 42; {=========================================} {=== 3 -> 3 functions ===} {=========================================} f000 x = case x of D3 n -> f000 (D3 n) end; f222 x = D3 (f11 (case x of D3 n -> n end)); f012 x = case x of D3 n -> D3 n end; f011 x = case x of D3 n -> D3 (f00 n) end; f022 x = case x of D3 n -> D3 (f11 n) end; f111 x = D3 (f00 (case x of D3 n -> n end)); f112 x = D3 (f01 (case x of D3 n -> n end)); f122 x = D3 (f01 (case (f022 x) of D3 n -> n end)); f002 x = let aux = \y -> if y (D3 1) (D3 1) in case x of D3 n -> aux n end; f001 x = let aux = \y -> if y (D3 (f00 y)) (D3 (f00 y)) in case x of D3 n -> aux n end; {==================================================================} {=== end ===} {==================================================================}