···1122(* Word Graph
33+ (example taken from The Stanford GraphBase)
3445 Given a number of letters n and a file containing words (one per line),
56 this program builds the undirected graph where
···14151516open Format
1617open Graph
1717-module H = Hashtbl.Make(String)
1818+1919+module S = struct
2020+ type t = string
2121+ let compare = compare
2222+ let hash = Hashtbl.hash
2323+ let equal = (=)
2424+end
2525+module H = Hashtbl.Make(S)
18261919-module G = Imperative.Graph.Abstract(String)
2727+module G = Imperative.Graph.Abstract(S)
2028let g = G.create ()
21292230let words : G.V.t H.t = H.create 16