summaryrefslogtreecommitdiff
path: root/tests/functor.lac
blob: ef81300d21530917c1fe8ee4d71efb7c95dbdaa1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
signature S = sig
        type t
        val z : t
        val s : t -> t
end

signature T = sig
        type t
        val three : t
end

structure F = functor (M : S) : T => struct
        val t = M.t
        val three = M.s (M.s (M.s M.z))
end