Functional Thinking

Errata for Functional Thinking

Submit your own errata for this product.


The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question Note Update



Version Location Description Submitted By Date Submitted Date Corrected
PDF
9

I'd suggest the example of the generalization of indexOfAny should be changed to allIndexesOfAny, instead of lazyIndexOfAny. The name "lazyIndexOfAny" does not reflect the fact that the function may now return a collection (Vector) instead of a single value. Good read, btw!

Gerardo Blanco  May 18, 2014  Jun 26, 2014
PDF
9

I'd suggest the example of the generalization of indexOfAny should be changed to allIndexesOfAny, instead of lazyIndexOfAny. The name "lazyIndexOfAny" does not reflect the fact that the function may now return a collection (Vector) instead of a single value. Good read, btw!

Gerardo Blanco  May 18, 2014  Jun 26, 2014
PDF
Page 1
last paragraph

On the first page it says: "Even if you donít care anything about Scala or Clojure, and are happy coding in your current language for the rest of career,..." I think it should be: "Even if you donít care anything about Scala or Clojure, and are happy coding in your current language for the rest of YOUR career,..."

Matthias Braun  May 15, 2014  Jun 26, 2014
PDF
Page 2
3rd paragraph

Jon Bently should be Jon Bentley

Matthias Braun  May 15, 2014  Jun 26, 2014
PDF
Page 4
3rd paragraph

"C\++" should be "C++"

Anonymous  May 15, 2014  Jun 26, 2014
PDF
Page 4
3rd paragraph

"Even the venerable C\++ added lamba blocks (i.e., higher-order functions) in their 11th standard" should be "Even the venerable C++ added lamba blocks (i.e., higher-order functions) in the 2011 standard"; it's a year, not an edition number.

David Starner  May 31, 2014  Jun 26, 2014
PDF
Page 5
side bar graphic

Here and elsewhere in the book a raven graphic (quothing, nevermore) appears. That graphic isn't introduced in the front matter (p. vii), which itself seems to indicate that a version of the books cover art will be used for tips.

Anonymous  May 16, 2014  Jun 26, 2014
PDF
Page 6
2nd paragraph

"to make errors.I will" is missing a space after the period.

Anonymous  May 15, 2014  Jun 26, 2014
PDF
Page 7
Last paragraph

"The Indexofany() method" should be "The indexOfAny() method"

Anonymous  May 15, 2014  Jun 26, 2014
PDF
Page 8
example 1-4 indexOfAny example cases

If you're going to use the equals sign to indicate what each call returns, you should use == (equality test) rather than = (assignment). ex: StringUtils.indexOfAny(null, *) = -1 should be StringUtils.indexOfAny(null, *) == -1

Anonymous  May 15, 2014  Jun 26, 2014
PDF
Page 8
Example 1-5

The code is described as doing "The Indexofany() method accepts a String and an array and returns the index of the first occurance in the String of any of the characters in the array". The Scala code, however, returns the index of the first occurrence of of the first character found in the String; if it is intended to do what is described, the for loop variables need to be swapped "pair <- indexedInput; char <- searchChars". (And while I'm on this code, I'd quibble about whether the first parameter should be a String; Strings may be convertible to Seq[Char], but programmers will read function parameters of String, Seq[Char] in a very different way from Seq[Char], Seq[Char].)

David Starner  May 31, 2014  Jun 26, 2014
PDF
Page 8
United States

example 1-4, what's the * in the first four example cases? (You should probably indicate the language on every example, regardless of how obvious it seems.) Looks like that comes from copying the Javadoc straight up.

Jeff Langr  May 22, 2014  Jun 26, 2014
PDF
Page 9
1st paragraph

"the problems asks for only the first match" should be "the problem asks for only the first match" (omit the S at the end of PROBLEM)

Anonymous  May 15, 2014  Jun 26, 2014
PDF
Page 9
Example 1-6

This sample code, as per example 1-5, needs the char and the pair lines swapped to work as per description. More problematically, this code claims to return a lazy list, but it's not at all. Seqs by default in Scala are eager; if you want lazy, you need to explicitly use a Stream, and I believe that will need a different syntax.

David Starner  May 31, 2014  Jun 26, 2014
PDF
Page 9
2nd paragraph

Text says: "But langauges like Scala feature" instead of "But languages like Scala feature" "Language" is mispelled in several other locations in book.

Anonymous  Jun 13, 2014  Jun 26, 2014
PDF
Page 11
1st paragraph

" JavaScriptís if statment works" -> " JavaScriptís if statement works" (missing e)

Anonymous  May 15, 2014  Jun 26, 2014
PDF
Page 11
2nd paragraph

"Writing functional code doesnít require a *shift* to a functional programming language like Scala or Clojure but rather a *shift* in the way you approach problems." You emphasize SHIFT... but that's not your parallel difference: consider emphasizing PROGRAMMING LANGUAGE and APPROACH.

Anonymous  May 15, 2014  Jun 26, 2014
PDF
Page 12
Paragraph 4

Text says "In in imperative..." Should say "In imperative.."

Anonymous  Jun 13, 2014  Jun 26, 2014
PDF
Page 13
Example 2-3

I'm not sure if this is an error or just a case of presenting the code as simply as possible but in the example: Example 2-3. Java 8 version of the Company Process public String cleanNames(List<String> names) { if (names == null) return ""; return names .stream() .filter(name -> name.length() > 1) .map(name -> capitalize(name)) .collect(Collectors.joining(",")); } The code doesn't check if each name is null so will the line .filter(name -> name.length() > 1) cause a NullPointerException if a name in the list is null?

Anonymous  Jun 13, 2014  Jun 26, 2014
PDF
Page 14
2nd paragraph

"Groovy has these features but names them more consistently with scripting languages like Ruby." should be "...than scripting languages..."

Anonymous  May 15, 2014  Jun 26, 2014
PDF
Page 15
3rd paragraph

"The thread-last (->>)macro takes" needs space added after )

Anonymous  May 15, 2014  Jun 26, 2014
PDF
Page 17
Code example 2-9

unlike other Java examples in this section, this example doesn't include the necessary import statements that would make the code executable.

Anonymous  May 16, 2014  Jun 26, 2014
PDF
Page 18
1st paragraph following example 2-9

"In the NumberClassifier class"... The class isn't called NumberClassifier, although the typeface used would lead you to think it was; the class is ImpNumberClassifierSimple.

Anonymous  May 16, 2014  Jun 26, 2014
PDF
Page 20
Code example 2-11

unlike other Java examples in this section, this example doesn't include the necessary import statements that would make the code executable.

Anonymous  May 16, 2014  Jun 26, 2014
PDF
Page 27
Between examples 2-16 and 2-17

"the final call to unique(), which removes duplicates in the list, to ensure that whole-number square roots (like 4) donít appear in the list twice." change "to ensure" to "ensures"

Anonymous  May 16, 2014  Jun 26, 2014
PDF
Page 30
figure 2-3

Or, instead of "_" you could specify that the seed value would be added to the first value of the list (in this case the seed value is 0).

David DeCesare  Jun 07, 2014  Jun 26, 2014
PDF
Page 32
4th paragraph

The line "...partition() function, which modifies a collection by splitting it..." seems incorrect. The original collection is not modified. The result of the partition() function is multiple subsets of the original collection.

David DeCesare  Jun 07, 2014  Jun 26, 2014
PDF
Page 40
code example 3-1

The syntax coloring of the numeric literal 100_000 is incorrect.

Anonymous  May 16, 2014  Jun 26, 2014
PDF
Page 41
below code example 3-2

"In Example 3-2, I create a couple of employees and determine if their salary meets the criteria." There are multiple people with multiple salaries (your existing text suggest they share a single salary, which undermines the closure example). Should be "In Example 3-2, I create a couple of employees and determine if their salaries meet the criteria."

Anonymous  May 16, 2014  Jun 26, 2014
PDF
Page 51
5th paragraph

I believe the line "the idea of an implicit this context that appears as if by magic in every function" should read (remove "this"): "the idea of an implicit context that appears as if by magic in every function"

David DeCesare  Jun 08, 2014  Jun 26, 2014
PDF
Page 67
1st paragraph

"own rules: language designer have access" should be (designers - plural): "own rules: language designers have access"

David DeCesare  Jun 09, 2014  Jun 26, 2014
PDF
Page 70
General note on top

"functional programming will enter your life through the langauge(s) you now use as they evolve." language(s) is spelled wrong

Matthias Braun  Jul 04, 2014 
PDF
Page 76
1st paragraph

"racge" should be "range"

David DeCesare  Jun 14, 2014  Jun 26, 2014
PDF
Page 79
1st paragraph

Need a space between "chapters," and "but" (chapters,but)

David DeCesare  Jun 14, 2014  Jun 26, 2014
PDF
Page 83
2nd paragraph

There's a "z" at the very end of the 2nd paragraph that should be removed (data structures.z).

David DeCesare  Jun 14, 2014  Jun 26, 2014
PDF
Page 86
3rd paragraph

"introducced" should be "introduced"

David DeCesare  Jun 14, 2014  Jun 26, 2014
PDF
Page 89
1st heading

"multi-methods" should be "multimethods" (no dash) to be consistent with the rest of the paragraph.

David DeCesare  Jun 14, 2014  Jun 26, 2014
PDF
Page 93
Example 5-11

The test methods names should end with "_test" to match the paragraph below it.

David DeCesare  Jun 14, 2014  Jun 26, 2014
PDF
Page 105
1st paragraph

Unless you are trying to relive the 80's, you should remove the word "like" from the line "youíd like just return a keyword".

David DeCesare  Jun 14, 2014  Jun 26, 2014
PDF
Page 132
Footer

The footer on the last page reads "Chapter 0: Advance" when it should be "Chapter 6: Advance" (6 instead of 0).

David DeCesare  Jun 15, 2014  Jun 26, 2014