blob: bfff8daff666ef6f2326f74e9ff87729e575dbc5 (
plain)
1
2
3
4
5
6
7
8
9
|
datatype list a = Nil | Cons of a * list a
val rec append : t ::: Type -> list t -> list t -> list t = fn t ::: Type => fn ls1 => fn ls2 =>
case ls1 of
Nil => ls2
| Cons (h, t) => Cons (h, append t ls2)
(*val rec ones : list int = Cons (1, ones)*)
val rec ones : unit -> list int = fn () => Cons (1, ones ())
|