O'Reilly logo

Practical Clojure by Luke VanderHart, Stuart Sierra

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

Chapter 3. Controlling Program Flow

Functions

As a functional language, functions are the beginning and end of every Clojure program. The "shape" of any Clojure program is like a tree, each function branching out and calling other functions. Understanding a Clojure program means understanding its functions and the patterns in which they are called. Use functions carelessly and your Clojure programs will be incomprehensible spaghetti. Use them thoughtfully and your Clojure programs will be fast, elegant, and a genuine joy both to write and to read.

First-Class Functions

In Clojure, all functions are first-class objects. This means the following:

  • They can be dynamically created at any point during the execution of the program.

  • They aren't intrinsically ...

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