October 2016
Intermediate to advanced
618 pages
10h 44m
English
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:
def and letif and if-notwhen and when-notcase and conddo and dotimesloop and recurYou 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 def and 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)
This ...
Read now
Unlock full access