Unordered Collections
Learn about and look at unordered collections.
Maps
A map is a collection that maps keys to values. In Clojure, there are two different types—hashed and sorted.
Hash map
A hash map is the most used map in Clojure. It requires keys that correctly support hashCode
and equals
.
When should we use it?
They’re useful for:
Representing entities
When the order isn’t important, and we’re going to perform random access using keys
When we don’t want to have duplicated keys
Associating keys to values
Removing key-value pairs based on the key ...
Access this course and 1400+ top-rated courses and projects.