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
  • 209
  • 1
  • 3
  • 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
  • 79,187
  • 7
  • 161
  • 281
Ashish Agarwal
  • 3,000
  • 16
  • 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
  • 25,428
  • 34
  • 149
  • 271