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?
Asked
Active
Viewed 161 times
0
-
You second question should be posted separately. It is entirely unrelated to the first question. – Ashish Agarwal Dec 10 '13 at 22:53
2 Answers
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
-
1I 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
-
-
@newacct True, I just thought the OP even does not know what is Map and what is Set, so HashMap and HashSet are simpler to understand – Jackson Tale Dec 11 '13 at 09:31