Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module type TOKEN =
- sig
- type t
- val to_string : t -> string
- end
- module Make_M (Token : TOKEN) =
- struct
- type t = { x : Token.t }
- let create (value : Token.t) = { x = value }
- let f (a : t) =
- print_endline (Token.to_string a.x)
- end
- module IntToken =
- struct
- type t = int
- let to_string = string_of_int
- end
- let () =
- let module M = Make_M (IntToken) in
- let z = M.create 5 in ()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement