In this recipe, we will review Clojure programming control structures related to vars and values, conditions, iterations, and loops. We will use the following special forms, macros, and functions:
You only need REPL, as described in the first recipe in this chapter, and no additional libraries. Start REPL so that you can test the sample code immediately in this recipe.
Let's start with how to use
let to bind vars.
def is a special form that binds symbols in the global scope in their namespace.
def requires var and value:
(def var val)