Comparison of programming languages (associative array): Difference between revisions

Content deleted Content added
OCaml: copy editing and linking
OCaml: copy editing
Line 1,173:
</syntaxhighlight>
 
Note that in order to use <code>Map</code>, you have to provide the functor <code>Map.Make</code> with a module which defines the key type and the comparison function. The third-party library ExtLib provides a polymorphic version of functional maps, called <code>PMap</code>,<ref>https://web.archive.org/web/20081211233540/http://ocaml-extlib.googlecode.com/svn/doc/apiref/PMap.html</ref>, which is providedgiven thea comparison function upon creation.
 
Lists of pairs and functional maps both provide a purely functional interface. By contrast, hash tables provide an imperative interface. For many operations, hash tables are significantly faster than lists of pairs and functional maps.