Errata for Programming Clojure
We try to keep our books accurate, but sometimes mistakes creep in. This page lists the errors submitted by our astute readers. If you've found a new error, please submit it.
The latest version of the book is P1.0, released about 1 month ago. If you've bought a PDF of the book and would like to upgrade it to this version (for free), visit your home page.
| Paper | Description | Found in | Fixed in | |
|---|---|---|---|---|
| 1 |
#39296: In the repl.bat file in the code download each REM command is lacking a space after it so you get errors running the file.--Dean Wilson |
P1.0
01-Jun-09 |
||
| 24 |
#39181: The common lisp code goes across a page break and is thus hard to read. I suggest reformatting it so it all comes on one page.--Michael Vanier |
B9.0
11-May-09 |
||
| 28 |
#39403: It is mentioned twice that "Clojure relies on Java's BigDecimal class for arbitrary-precision decimal numbers."
The first time with a refe...more...
|
P1.0
10-Jun-09 |
||
| 29 |
#39213: Quoting a text placed at the end of the page:
"[...] You do not have to worry about any of this, because the sample code includes all these...more...
|
B9.0
18-May-09 |
||
| 33 |
#39215: if is rendered as a keyword in 3rd line of examples/introduction.clj --Henrik Huttunen |
B9.0
18-May-09 |
||
| 33 |
#39787: Just a silly typo... The first call to "(hello "Stu")" doesn't show the correct output from the REPL. That is, it doesn't have the " marks. ...more...
|
P1.0
01-Jul-09 |
||
| 34 |
#39111: The comment in line 2 of examples/introduction.clj states
"Writes hello message to *out*...
Actually, it returns a String. No printing to st...more...
|
B9.0
05-May-09 |
||
| 36 |
#39253: Referencing the namespaced version of fibs, the text has "examples.introduction.fibs" whereas it should be "examples.introduction/fibs"--Alexander J. Taggart |
B9.0
26-May-09 |
||
| 36 |
#39112: first line on page says
|
B9.0
05-May-09 |
||
| 39 |
#39317: wrt to "Anonymous Functions", the book states "The syntax looks like this: (#body)", should be #(body).
|
P1.0
04-Jun-09 |
||
| 46 |
#39590: On the bottom third of the page, after "Now you can call round without having to qualify its name:", the code example is,
(round 1.2)
=> 2...more...
|
P1.0
21-Jun-09 |
||
| 55 |
#39118: mid page:
"If you want to make greeting issue a generic greeting when the caller omits name,..."
should be
"If you want to make greeting is...more...
|
B9.0
06-May-09 |
||
| 56 |
#39095: "Writing method implementations that differ by arity is useful. But if you come from an object-oriented background, you will want polymorphism...more...
|
B9.0
04-May-09 |
||
| 66 |
#39800: incorrect result of (round 1.2) shown. It shows 2 when it's 1.
|
P1.0
02-Jul-09 |
||
| 67 |
#39125: top of page "| Saw a big number 200" should be (remove a blank) "| Saw a big number 200"--Filip Moens |
B9.0
06-May-09 |
||
| 72 |
#39809: (index-filter #{\a \b} "xyz") returned () instead of nil--Joe Straitiff |
P1.0
03-Jul-09 |
||
| 74 |
#39131: Near mid-page: To add your own key/value pairs to a var, use the metadata
metadata should be in italic--Filip Moens |
B9.0
06-May-09 |
||
| 76 |
#39434: - You can also pass a nonstring to shout and see that
- Clojure enforces the :tag by attempting to cast the
- argument to a string"
Nope...more...
|
P1.0
12-Jun-09 |
||
| 77 |
#39136: gen-and-save-class doesn't seem to exist--George Jahad |
B9.0
07-May-09 |
||
| 81 |
#39813: user=> (import '(java.util Random Locale) '(java.text MessageFormat))
java.text.MessageFormat
Hence, the last import was returned instead ...more...
|
P1.0
03-Jul-09 |
||
| 94 |
#39168: The example code scripts in bin only work under bash. Under csh or tcsh, they immediately error out. One easy way to make the scripts more com...more...
|
B9.0
10-May-09 |
||
| 104 | 124 |
#39602: (for [n (whole-numbers) :while (even? n)] n) yields an empty list and not (0) as the seq from (whole-numbers) starts from 1. (sugg: replace ev...more...
|
P1.0
22-Jun-09 |
|
| 116 |
#39148: Near top:
repeat should be in italics--Filip Moens |
B9.0
08-May-09 |
||
| 152 |
#39147: The analysis of stack-consuming-fibo is a bit misleading. It generates a number of stack frames exponential in n. (This is also proportional t...more...
|
B9.0
08-May-09 |
||
| 188 |
#39359: the example create-runonce defines the (fn [& args]) but doesn't actually apply the args to the function. this makes the example in the book ...more...
|
P1.0
07-Jun-09 |
||
| 223 |
#39756: In the following text,
". . . until the unlucky day that you picked a local name like start, which
collided with a name inside bench:
(le...more...
|
P1.0
30-Jun-09 |
||
| 256 |
#39137: collection-tag definition is out of dat--George Jahad |
B9.0
07-May-09 |
