Associative array/Creation: Difference between revisions

Line 303:
===Binary tree===
A simple idiom to create a persistent binary tree mapping strings to integers:
module String = struct
type t = string
let compare = Pervasives.compare
end
 
module StringMap = Map.Make(String);;
let map = StringMap.empty;;
Anonymous user