7f918cf1 CE |
1 | open Vector |
2 | |
3 | datatype t = T of t vector |
4 | fun makeT () = T (tabulate (0, fn _ => makeT ())) |
5 | fun destT (T v) = |
6 | if length v > 0 |
7 | then 1 + destT (sub (v, 0)) |
8 | else 0 |
9 | val _ = |
10 | if 0 = destT (makeT ()) |
11 | then () |
12 | else raise Fail "bug" |