Related Titles

Full Description

This book is the first definitive reference for the Clojure language, providing both an introduction to functional programming in general and a more specific introduction to Clojures features. This book demonstrates the use of the language through examples, including features such as software transactional memory (STM) and immutability, which may be new to programmers coming from other languages.

Overview of functional programming and description of what sets Clojure apart from other languages

Detailed explanation of Clojures special features

Examples of real-world tasks that are well-suited to Clojures capabilities, starting with simple tasks and moving on to more complex applications

What youll learn

What Clojure ismore than just another Lisp

How to set up a Clojure environment

The structure and syntax of a Clojure program

Java interoperability

How to use Clojure for real-world tasks

Common idioms of Clojure code

Who this book is for

There are two audiences for this book: any technical person desiring to know what Clojure is and why they might want to use it, and any programmer desiring to learn and use the language. The goals of these two audiences mesh nicely, given that Clojure has several new, cutting-edge features that programmers are unlikely to have encountered before.

There is a space after "!" in the typed input which is not in the returned value.

On page
32:

In the function "square-or-multiply" the second alternative implementation is wrongly indented.

On page
33:

The output of the prompt is not consistent "#'user/sq" versus "'#user/multiply" (ie. the order of "'" and "#").

On page
44:

The application of arg-switch with a custom function seems wrongly indented (ie. the indentation of "(/ a (* b b)))" and "2 3)".

On page
46:

There is an "-" before rangechecker in the text (which also appears in the index).

On page
46:

"#´user/times-pi" => "#'user/times-pi". This occurs in several places in the book, but a search-replace from "#´" to "#'" could solve this.

On page
53-?:

In all of chapter 4 the symbol "->" is used to denote the result returned from an evaluation, but the symbol is only used in this chapter as far as I can tell.

On page
57:

In the description of the Neg? function:"returns true if it is > 0" should be "returns true if it is < 0"

On page
58-59:

In the section "Regular Expression Functions" there are additional spaces in front of and behind the regular expressions which should not be there. There are in total 3 additional spaces on page 58 and 6 spaces on page 59.

On page
63:

In the subsections "pop" and "list?" the symbol "´" is used instead of "'" to qoute a list.

On page
65 (epub):

The argument to the re-pattern function appears to have a leading space (" [a-zA-Z]"); however, the value does not (#"[a-zA-Z]*").

On page
66 (epub):

The example argument to the re-seq function contains spaces #" [a-z] ". The result of invoking the function is nil.

To obtain the result printed in the text, remove the leading and trailing space characters.

The ++ macro definition seems to be incorrect both the 'then' and 'else' expressions of the if statement are inside the test expression, leading to a 'Too few arguments to if' exception when I try to execute the defmacro as defined.

Also the splicing unquote here ~@(first exprs) throws an exception trying to convert an Integer to an ISeq.