Chapter 2. Drinking from the Clojure fire hose

This chapter covers

  • Scalars: the base data types
  • Putting things together: collections
  • Making things happen: functions
  • Vars are not variables
  • Locals, loops, and blocks
  • Preventing things from happening: quoting
  • Using host libraries via interop
  • Exceptional circumstances
  • Modularizing code with namespaces

This chapter provides a quick tour of the bare necessities—the things you’ll need to know to understand the rest of this book. It may seem odd to provide a tutorial-like chapter right away, but we felt that it was more important to introduce the ideas of the language first rather than the mechanics.[1] If you’ve been programming with Clojure for a while, this may be a review, but otherwise ...

Get The Joy of Clojure, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.