I am reading Real World Ocaml. I read about the modules and functors.
This part type t = (string,int,String.comparator_witness) Map.t
of it is not making sense. What is it doing? What is this syntax? Any pointers in the docs?
open Base
type t = (string,int,String.comparator_witness) Map.t
let empty = Map.empty (module String)
let to_list t = Map.to_alist t
let touch t s =
let count =
match Map.find t s with
| None -> 0
| Some x -> x
in
Map.set t ~key:s ~data:(count + 1)
Source: http://dev.realworldocaml.org/files-modules-and-programs.html
Thank you!