You are previewing The Joy of Clojure.

The Joy of Clojure

Cover of The Joy of Clojure by Chris Houser... Published by Manning Publications

Chapter 4. On scalars

It requires a very unusual mind to undertake the analysis of the obvious.

Alfred North Whitehead



So far, we’ve covered a somewhat eclectic mix of theoretical and practical concerns. This brings us now to a point where we can dive deeper into a fundamental topic: how Clojure deals with scalar values, including numeric, symbolic, and regular expression values, and how they behave as data and sometimes as code.

A scalar data type is one that can only hold one value at a time of a number, symbol, keyword, string, or character. Most of the use cases for Clojure’s scalar data ...

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