fun fst [a] [b] (x : a) (y : b) = x
fun snd [a] [b] (x : a) (y : b) = y
fun fact n =
case n of
0 => 1
| _ => n * fact (n - 1)
datatype t =
A
| B of {C : int, D : float}
| E of t * t
fun render x =
case x of
A => "A"
| B {C = n1, D = n2} => "B(" ^ show n1 ^ "," ^ show n2 ^ ")"
| E (x, y) => "C(" ^ render x ^ "," ^ render y ^ ")"
fun main () =
s <- source "";
s' <- source "";
f <- source (plus 1);
f2 <- source fst;
r <- source {A = "x", B = "y"};
t <- source (E (A, B {C = 10, D = 1.23}));
ht <- source Nothing here yet.;
return