This is the resources website for Pearson's book Functional and Concurrent Programming: Core Concepts and Features.
p. xxxiv: In the third paragraph, “has been to used to” should be “has been used to”.
p. 176: The caption of Listing 12.2 should say “using” instead of “uisng”.
ListADT
class should either define monomorphic lists:
abstract class ListADT[A]:
type List
val empty: List
def cons(x: A, list: List): List
...
or polymorphic lists:
abstract class ListADT:
type List[_]
def empty[A]: List[A]
def cons[A](x: A, list: List[A]): List[A]
...
The version in the book defines monomorphic lists, but refers to them as List[A]
instead of List
; the type argument [A]
is not used and should be removed.
p. 246: In the third paragraph, Title[A]
should be Titled[A]
.
def getAll: List[String] = synchronized(ArrayList(contents))
p. 353: Although harmless, the test || !queue.isEmpty
inside writeTask
is unnecessary and can be removed.
{runner-seq}
line in the Runner
listing is leftover LaTeX due to last minute changes; it is not part of the code and should be ignored.