Jump to content

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
Cookies help us deliver our services. By using our services, you agree to our use of cookies.