Content deleted Content added
→Objective-C (Cocoa/GNUstep): templating, reviving bare-URL reference |
→OCaml: templating bare-URL reference |
||
Line 1,172:
</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>{{cite web |title=Module PMap |url=http://ocaml-extlib.googlecode.com/svn/doc/apiref/PMap.html |date=2008 |archive-url=https://web.archive.org/web/20081211233540/http://ocaml-extlib.googlecode.com/svn/doc/apiref/PMap.html |archive-date=11 December 2008 |website=Ocaml-extlib |access-date=3 August 2020}}</ref> which is given a 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.
|