May 2018
Beginner to intermediate
290 pages
6h 43m
English
If you need to get hold of all the keys in a map—well, you can guess the function name:
| | (keys book) |
Evaluate that expression and you will end up with a collection of the keys of your map, something like this:
| | (:title :author :published) |
Or it might be (:published :title :author) or (:author :published :title); the maps that you create with the literal {} or the hash-map function make no promises about the order of their keys.
Sorted Maps | |
|---|---|
|
|
There is a second flavor of map that keeps its keys sorted. You can make one of these sorted maps with the aptly named function sorted-map. |
In much the same way that you can get ...
Read now
Unlock full access