You are previewing The Joy of Clojure.

The Joy of Clojure

Cover of The Joy of Clojure by Chris Houser... Published by Manning Publications
O'Reilly logo

Chapter 5. Composite data types

It is better to have 100 functions operate on one data structure than 10 functions on 10 data structures.

Alan Perlis

 

 

Clojure provides a rich set of composite data types and we’ll cover them all: vectors, lists, queues, sets, and maps. In this chapter, we’ll dig into the strengths and weaknesses of each. We’ll spend more time on vectors and maps than on the other types, because those two are used in a wider variety of ...

The best content for your career. Discover unlimited learning on demand for around $1/day.