1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
signature S = sig type t val z : t val s : t -> t end signature T = sig type t val three : t end signature F = functor (M : S) : T structure F = functor (M : S) : T => struct type t = M.t val three = M.s (M.s (M.s M.z)) end structure F2 : F = F