August 2014
Intermediate to advanced
120 pages
2h 45m
English
One helpful set of exercises for Clojure newcomers, the Clojure Koans,[26] has its code structure based on a macro called meditations that presents a boilerplate-free interface. Perhaps you’ve already tried these out as I suggested in the Introduction and wondered how it worked under the hood. The koans ask you to fill in the blanks in order to make each test pass:
| apis/koans_1.clj | |
| | (meditations |
| | "We shall contemplate truth by testing reality, via equality" |
| | (= __ true) |
| | |
| | "To understand reality, we must compare our expectations against reality" |
| | (= __ (+ 1 1))) |
But in the interface that the meditations macro presents, there are no tests! We just see some (more or less helpful) text vaguely describing an expression ...
Read now
Unlock full access