ERRATA IN "ML for the Working Programmer", 2ND EDITION ** Chapter 1 ** 6, line -5: (Dwight VandenBerghe) arguments using 12, info: (Dwight VandenBerghe) Milner's book is now in a new edition, 1997 13, line -1: (Dwight VandenBerghe) the last sentence is out of date 14, line 7: whose contents are specified ** Chapter 2 ** 22 line -14: delete "the" before "booleans" 23 lines 9-10: (Dwight VandenBerghe) omit spaces around "area" 67, line 1: (Tobias Nipkow) The reference shown in the text outlines the framework for proving that types are principal, but omits the proof itself, which may be found in Damas's 1985 PhD thesis from Edinburgh University. ** Chapter 3 ** 91, function delrow. The equality test on reals has recently been made illegal. The Basis Library now provides the function Real.== for the equality test. 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 call with an explicit rev, e.g. rev (depth (["a"], graph1, [])); 117, line 12: the test a+b=0.0 is now illegal; see note above re page 91. ** Chapter 4 ** 133, line -13 (Stephen Arons): "as keyword@as keyword" should not appear (it is indexing information) 139, line -13 (Claus-Peter Wirth): empty list erroneously occurs as first (of three!!) arguments of first call to backChange (taking two args!!). ** Chapter 5 ** #186, line -2 (Franklin Chen): the expression given to ML should be # foldr op@ [] [[1], [2,3], [4,5,6]]; #187, line 3 (Franklin Chen): the expression given to ML should be # foldr newmem [] (explode"Margaret"); p209, line 8 (Wei Ke): the other columns are shifted to the right (not the left) ** Chapter 6 ** 246: In the statement of Theorem 19, delete "and a" 237, line -12, Ex6.20 (Wei Ke): extra parenthesis at the right end 239, line -6 (Wei Ke): Strictly speaking, the proof of theorem 17 is by complete induction. 249, line -9 (Wei Ke): in tmergesort, List.take should be take and List.drop should be drop. ** Chapter 8 ** #332: in figure all nodes should be the same shade of grey #335,-1 (Namhyun Hur): missing space between "Vector" and "declares" #351, Exercise 8.32: all the escape sequences require a terminating semicolon, #as in <. Moreover one may use a literal " instead of the " sequence. ** Chapter 9 ** 381 (Claus-Peter Wirth): first grammar rule for Term should be Term = % Id Id* . Term ** Bibliography ** #452: Grant (1996) has appeared, pages 143-170. #452: Greiner (1996) has appeared, pages 111-141. #453: the URL in Jones (1995) should be http://www.cs.uiowa.edu/~jones/pdp8/ #453: in Knuth (1981), the title Seminumerical Algorithms should be italicised #456: the URL in Wadler and Gill (1995) should be # http://www.dcs.glasgow.ac.uk/fp/realworld/ ** Syntax Charts ** 459 (John Reppy): an "include" specification may also give an explicit signature. A useful example is "include SIG where type t = int". ** Index ** 469: "~ function 22, 23" is redundant 469: "as keyword" needs an entry to page 133 (see above) ** Predeclared Identifiers ** 478 (Sarah Mount): function "ignore" has type 'a->unit, and not int->unit as stated Last modified 28 November 2001 # against an erratum means it was corrected in the 1997 printing