O'Reilly logo

Clojure Applied by Alex Miller, Ben Vandgrift

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Choosing the Right Collection

Clojure has a small number of provided collections that are used in combination for virtually every application need. We expect that you’re already familiar with the basics of the four primary Clojure collections: lists, vectors, sets, and maps.

When choosing the right collection to use, we’re guided by the characteristics of the data at hand and the operations we expect to call on the collection. Clojure collection functions often specify performance constraints that must be met by the implementer.

If we need an association from a key to a value, maps are the obvious choice. In our domain model we considered the use of maps as an entity holder— as an association between entity field and value. We also saw maps ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required