Effective Haskell - Chapter 4 Suggestions and Errata

In the “Functions as Data Types” section of Chapter 4 (ePub p 113), the takeDigits parser is introduced as “we could take some digits from the front of the string” but as defined it just takes characters from the front (no check if the character is a digit) and when used, some of the strings have no digits. Maybe it should be called “takeChars”?

In the section header “Creating Types Aliases” (ePub - p 115), types should be singular.

In the BinaryTree exercise, the type signature for doesIntExist should be “BinaryTree Int → Int → Bool”

1 Like