May 2018
Beginner to intermediate
290 pages
6h 43m
English
To make all this theory a bit more real, let’s dive into the machinery that Clojure uses to read data and execute code. Actually, calling it machinery is overstating things since we’re talking about two functions, one mundane and one wonderful. The mundane function is read and it does exactly what its name suggests: it reads data. Feed read a character-producing input stream—perhaps an open file or a network connection or your terminal—and it will read and return one Clojure value. Conveniently, if you just call read without any parameters, it will read from standard input. So if you call (read) in the REPL like this:
| | user=> (read) |
then read will sit there quietly, waiting for you to type something in. So enter 55
Read now
Unlock full access