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?

1
  • You second question should be posted separately. It is entirely unrelated to the first question. Commented Dec 10, 2013 at 22:53

2 Answers 2

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.

Sign up to request clarification or add additional context in comments.

1 Comment

I think the term "standard library" is well-defined. Third-party libraries are not part of the standard library.
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.

2 Comments

It's more like TreeMap and TreeSet in Java.
@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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.