0

I have a question. If Module Map is in standard OCaml ? I cannot find answer in the internet. Additionaly, what is difference between Map and Set?

user3077133
  • 191
  • 1
  • 2
  • 6

2 Answers2

3

It depends on what you mean by "standard" OCaml. The compiler is distributed with a small library, and yes that does have a Map module. Its documentation is here. This library is often called the "Standard Library", but there are actually two other libraries that are more comprehensive: Batteries and Core. They both also have a Map module.

Pascal Cuoq
  • 77,397
  • 7
  • 153
  • 272
Ashish Agarwal
  • 2,930
  • 15
  • 18
  • 1
    I think the term "standard library" is well-defined. Third-party libraries are not part of the standard library. – newacct Dec 11 '13 at 01:32
0

Yes, Map is a standard module in OCaml: http://caml.inria.fr/pub/docs/manual-ocaml/libref/Map.html

To know the diff between map and set, you better have a look at Difference between HashSet and HashMap?

Map in OCaml is like HashMap in Java, so does Set.

Community
  • 1
  • 1
Jackson Tale
  • 24,728
  • 32
  • 141
  • 264