October 2016
Intermediate to advanced
618 pages
10h 44m
English
In this recipe, we will review primitive data types that Clojure supports and a few functions that manipulate these types. Here, we will review the following:
You only need REPL, as described in the previous recipe, and no additional libraries. Start REPL so that you can review the sample code of primitive types immediately in this recipe.
Let's start with numbers in Clojure data types.
The + function returns the sum of numbers. You can specify any number of numbers as arguments:
(+ 1 2) ;;=> 3 (+ 1 2 3) ;;=> 6 (+ 1.2 3.5) ;;=> 4.7
The - function subtracts the numbers. If a single argument ...
Read now
Unlock full access