67, line 1: (Tobias Nipkow) The remark about Damas and Milner (1982) is misleading: this paper outlines the framework for proving that types are principal. The proof itself may be found in Damas's 1985 PhD thesis from Edinburgh University.

Chapter 3

91, function delrow. Replace p = hd row by Real.==(p,hd how). (The equality test on reals has become illegal in the past few years. The Basis Library now provides the function Real.== for the equality test.)

93, near bottom (Spyros Sarigiannidis). Replace "the form (u,y) for u<x" by "the form (u,y) for u≤x" (less-than or equals).

104, bottom (Nancy Rettew, via Marco Valtorta). Function depth is incorrect. The rev visited in the first pattern produces incorrect answers because it reverses the results of the inner calls too. (The previous function, depthf, is OK because it has no inner calls, and later functions do not reverse their result.) Change the first line to

fun depth ([], graph, visited) = visited

and reverse its final result using an explicit call to rev:

rev (depth (["a"], graph1, []));

117, line 12: replace the test a+b=0.0 by Real.==(a+b,0.0). (See the note above for page 91.)

Chapter 6

246, line 1: the Boyer and Moore theorem prover has been superseded by ACL2. A suitable book is Computer-Aided Reasoning: An Approach by Matt Kaufmann, Panagiotis Manolios, and J Strother Moore, Kluwer, 2000.

246: In the last line of the statement of Theorem 19, delete "and a"

249, line -9 (Wei Ke): in tmergesort, replace List.take by take and List.drop by drop. (This example is self-contained and does not refer to external functions.)

Chapter 7

279, line -9 (Wei Ke): ML should respond to the declaration of zz with val zz = ...

Syntax Charts

459 (John Reppy): an include specification may also give an explicit signature. A useful example is "include SIG where type t = int".

459 (Martin von Gagern): the "and" loop in Datatype Bindings is unnecessary, because Datatype Bindings themselves contain such a loop.

461 (Martin von Gagern): the constructors of a Datatype Binding should be Names, not Idents. Thus, a constructor may have the form "op **", where ** is any infix operator. (This is the only difference between datatype declarations and datatype specifications, which appear in signatures. Thus, it is a quirk of ML itself.)

461 (Martin von Gagern): sharing constraints may not be joined with and; instead, use a series of sharing constraints.