January 2017
Intermediate to advanced
565 pages
13h 46m
English
Let's take a deep dive into Clojure's syntax now, it is pretty different from other languages but it is actually much simpler. Lisps have a very regular syntax, with few special rules. As we said earlier, Clojure code is made of S-expressions and S-expressions are just lists. Let's look at some examples of lists to become familiar with lists in Lisp.
(1 2 3 4)
(println "Hello world")
(one two three)
("one" two three)All of the above are lists, but not all of them are valid code. Remember, only lists where the first element is a function can be considered valid expressions. So, here only the following could be valid expressions:
(println "Hello world") (one two three)
If println and one are defined as functions. ...
Read now
Unlock full access