Programming F#

Errata for Programming F#

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
Printed
Page *
*

Lots of minor typos and edits: Page 21 (last paragraph) ... operators listed Table 2-8 ... ... operators list in Table 2-8 ... Page 63 (2nd paragraph) ... using a pattern matching ... ... using pattern matching ... Page 99 (section with animal footprints) ... (opposed to None ... ... as opposed to None ... Page 131 (1st paragraph) ... We’ve now see ... ... We've now seen ... Page 155 (1st paragraph, section “Extending Modules”) ... types, and value will ... ... types, and values will ... Page 166 (last words on page) ... do not accept values marked them ... ... do not accept values marked with them ... Page 188 (last paragraph before code example) ... of this is this infLoop function in Example 7-16. ... ... of this infLoop function is in Example 7-16 ... Page 249 (code comments) ... // to a fix number of significant ... ... // to a fixed number of significant ... Page 270 (middle, end of the pharagraph) ... web pages in parallel:s ... ... web pages in parallel: ... Page 284 (code comment near bottom) ... store the occurances of particular words ... ... store the occurrences of particular words ... Page 286 (code comment near top) ... // If the counter has reaced x ... ... // If the counter has reached x ... Page 295 (top, code comment) ... // Return if a object has a ... ... // Return if an object has a ... Page 298 (middle, code comment) ... // Definte a polite text writer ... ... // Define a polite text writer ... Page 364 (near bottom) ... Widget with value of null, a compiler ... ... Widget with a value of null, a compiler ...

Chris Smith
Chris Smith
O'Reilly Author 
Mar 11, 2010 
Printed
Page 10
Top of page

The second example is missing the double semi-colon. It should be: > // Introduce two values let x = 1 let y = 2.3;; val x : int val y : float ... (I actually get slightly different output from the Visual Studio 2010 Beta, but I guess that is a post-printing change)

Note from the Author or Editor:
The text: val x : int val y : float Needs to be updated to: val x : int = 1 val y : float = 2.3

Laurion Burchall  Nov 04, 2009 
PDF
Page 10
The last line

val main : string array -> int should be: val main : string [] -> int maybe F# 2.0 syntax changed.

Note from the Author or Editor:
Yup, thank you for your feedback.

skyiv  May 07, 2010 
PDF
Page 13
3rd paragraph

The third section details foundational types such as list, option, and unit. should be: The fourth section details foundational types such as list, option, and unit.

Note from the Author or Editor:
You are correct. Evidently that section on Comparison and Equality snuck up on in there.

skyiv  May 07, 2010 
Printed
Page 14
First code example under "Numeric Primitives"

book says: > let answerToEverything = 42UL;; val everything : uint64 = 42UL should say: > let answerToEverything = 42UL;; val answerToEverything = 42UL;;

Note from the Author or Editor:
Yes, the code: val everything : uint64 = 42UL should be replaced with: val answerToEverything : uint64 = 42UL

Chuck Smith  Nov 12, 2009 
Other Digital Version
14
before tabkle 2-1

avogadro number is the number of atoms in a mole, so the exponent is non negative. Errata: avogadro = 6.022e-23;; correct 6.022e23;;

Note from the Author or Editor:
I should have paid more attention in chemistry class :) The text on page 14 should be changed: ... > let avogadro = 6.022e-23;; ... to ... > let avogadro = 6.022e23;; ... and ...val avogadro : float = 6.022e-23 ... to ...val avogadro : float = 6.022e+23 ...

Marco Munari  Jan 19, 2010 
PDF
Page 14
Table 2-1

uint, uint32 u System.UInt32 should be: uint32 u System.UInt32 In F# 2.0, The type 'uint' is not defined.

Note from the Author or Editor:
Yup. I don't recall when we removed this from the core F# library.

skyiv  May 07, 2010 
PDF
Page 15
Table 2-1

float32 f System.Float should be: float32 f System.Single

skyiv  May 07, 2010 
PDF
Page 15
First code example

val it : int * int64 * sbyte = (64687, 4089, 42) should be: val it : int * int64 * sbyte = (64687, 4089L, 42y)

Note from the Author or Editor:
Yup, we now print numeric suffixes for non-integers in FSI.

skyiv  May 07, 2010 
Printed
Page 15
Table 2-1

System.Float is not a .NET type. System.Single is the intended type.

Note from the Author or Editor:
This has been since been fixed.

David Jones  Nov 29, 2012 
PDF
Page 17
Table 2-4

uint32, uint Converts data to a uint should be: uint32 Converts data to a uint32 In F# 2.0, The type 'uint' is not defined.

Note from the Author or Editor:
In table 2-4 the row which reads: uint32, uint // uint 0xFF // 255 Should read: uint32 // uint 0xFF // 255

skyiv  May 07, 2010 
PDF
Page 17
'BigInt' section

In F# 2.0, The type 'BigInt' is not defined, so: Section title BigInt should be: bigint F# has the BigInt type for representing arbitrarily large integers. should be: F# has the bigint type for representing arbitrarily large integers. While the BigInt type is simply an alias for the System.Numerics.BigInteger type, should be: While the bigint type is simply an alias for the System.Numerics.BigInteger type, BigInt uses the I suffix for literals. Example 2-1 defines data storage sizes as BigInts. should be: bigint uses the I suffix for literals. Example 2-1 defines data storage sizes as bigints. Example 2-1. The BigInt type for representing large integers should be: Example 2-1. The bigint type for representing large integers

Note from the Author or Editor:
Yes, there are a lot of other places (also reported) that need to replace BigInt with bigint.

skyiv  May 07, 2010 
PDF
Page 19
Under Table 2-6

you can pass it to any of the conversion routines listed earlier in Table 2-3. should be: you can pass it to any of the conversion routines listed earlier in Table 2-4.

Note from the Author or Editor:
The text which reads: you can pass it to any of the conversion routines listed earlier in Table 2-3. Should be replaced with the following (updated table number): you can pass it to any of the conversion routines listed earlier in Table 2-4.

skyiv  May 07, 2010 
PDF
Page 19
2nd code example

val multiline : string = "This string takes up multiple lines";; should be: val multiline : string = "This string takes up multiple lines"

Note from the Author or Editor:
Yup, those semi colons shouldn't be there.

skyiv  May 07, 2010 
PDF
Page 20
2nd code example

let longString = "abc-\ def-\ ghi";; should be: > let longString = "abc-\ def-\ ghi";; val longString : string = "abc-def-ghi"

Note from the Author or Editor:
Two lines need to be replaced in the 2nd example on page 20. First, the line which reads: let longString = "abc-\ Should be replaced with the following (added >): > let longString = "abc-\ Second, the last line which reads: val it : string = "abc-def-ghi" Should be replaced with: val longString : string = "abc-def-ghi"

skyiv  May 07, 2010 
PDF
Page 20
4th code example

val hello : byte array should be: val hello : byte [] maybe F# 2.0 syntax changed.

skyiv  May 07, 2010 
PDF
Page 22
-2 line

> let add x y = x + y should be: > let add x y = x + y;;

Note from the Author or Editor:
Doh, thank you for the feedback.

skyiv  May 07, 2010 
Printed
Page 23
bottom of page

let mult x y = x * x;; should be: let mult x y = x * y;;

Note from the Author or Editor:
The submitter had it exactly right: let mult x y = x * x;; should be: let mult x y = x * y;;

Magnus Lidbom  Nov 08, 2009 
PDF
Page 23
1st code example

Val it : 3 should be: val it : int = 3

skyiv  May 07, 2010 
PDF
Page 23
2nd code example

stdin(3,5): error FS0001: This expression has type float but is here used with type int. now is: Stdin(3,5): error FS0001: This expression was expected to have type int but here has type float F# 2.0's error message more clearly.

Note from the Author or Editor:
The code example on page 23 under "Type Inference" should be replaced with the following (only updates the last three lines): > add 1.0 2.0;; add 1.0 2.0;; ----^^^ stdin(3,5): error FS0001: This expression was expected to have type int but here has type float

skyiv  May 07, 2010 
PDF
Page 24
1st code example

val result : float should be: val result : float = 22.0

skyiv  May 07, 2010 
PDF
Page 26
2nd code example

val hardDriveSize : System.Numerics.BigInt = 250I should be: val hardDriveSize : System.Numerics.BigInteger = 250 here '250' for Microsoft (R) F# 2.0 Interactive build 4.0.30319.1 but '250I' for Microsoft (R) F# 2.0 Interactive build 2.0.0.0

skyiv  May 07, 2010 
PDF
Page 28
3rd code example

stdin(118,19): error FS0001: This expression has type string but is here used with type int. stopped due to error should be: stdin(118,19): error FS0001: This expression was expected to have type int but here has type string F# 2.0's error message more clearly.

Note from the Author or Editor:
Yup, the error message in the text is from an earlier version of F#.

skyiv  May 07, 2010 
PDF
Page 28
3rd code example

else "a string";; ------------------^^^^^^^^^^ stdin(118,19): error FS0001: This expression has type string but is here used with type int. stopped due to error sould be: "a string";; --------^^^^^^^^^^ stdin(118,9): error FS0001: This expression was expected to have type int but here has type string F# 2.0's error message more clearly.

skyiv  May 08, 2010 
PDF
Page 39
Example 2-7

val printNumber : int -> unit Printing 1 Printing 2 Printing 3 Printing 4 Printing 5 should be: Printing 1 Printing 2 Printing 3 Printing 4 Printing 5 val printNumber : int -> unit

Note from the Author or Editor:
You are correct. The F# Interactive window changed the order in which it printed the type information for the last expression.

skyiv  May 08, 2010 
PDF
Page 40
2nd code example

val containsNegativeNumbers : int list -> int list option should be: val isLessThanZero : int -> bool val containsNegativeNumbers : int list -> int list option

Note from the Author or Editor:
Yup, thank you for the keen eye.

skyiv  May 07, 2010 
PDF
Page 42
2nd code example

val location : string should be: val location : string = "World"

skyiv  May 07, 2010 
Printed
Page 44
1st example

Example 2-9 has a comment "// PlayingCard.Suit" and should be plural "// PlayingCards.Suit".

Note from the Author or Editor:
In the code of example 2-9 the text: ... // PlayingCard.Suit ... should be replaced with ... // PlayingCards.Suit ...

Michael  Dec 08, 2009 
Printed
Page 53
Example 3-3

Example 3-3 does not work as-is in VS 2010. "base" is apparently a keyword, so it should have been escaped or there is some voodoo to make it not a keyword that I've missed in the book. Line 2 of the example should look like this: let generatePowerOfFunc ``base`` = (fun exponent -> ``base`` ** exponent);; Alternatively, a different variable name should be chosen.

Note from the Author or Editor:
Thanks for the feedback, I must have missed the keyword being marked as reserved late in the product cycle. In a future version of the book I'll have it read: let generatePowerOfFunc baseValue = (fun exponent -> baseValue ** exponent);;

Owen Pellegrin  Jun 01, 2010 
Printed
Page 55
Example 3-4

The incorrect functions aren't defined properly instead of: else not (isEven (x-1)) else not (isOdd (x-1)) The code should be: else isEven (x-1) else isOdd (x-1) The incorrect have the same problem as the correct functions though -- they don't terminate properly on the false case. For example, isOdd(4) looks like this: isOdd(4) isEven(3) isOdd(2) isEven(1) isOdd(0) Then wraparound!

Note from the Author or Editor:
The code in Example 3-4 needs to be updated. The first code snippet needs to read: > // Define mutually recursive functions let rec isOdd n = if n = 0 then false elif n = 1 then true else isEven (n - 1) let rec isEven n = if n = 0 then true elif n = 1 then false else isOdd (n - 1);; else isEven (n - 1) ---------^^^^^^ stdin(5,10): error FS0039: The value or constructor 'isEven' is not defined And later, the second code snippet needs to read: > // Define mutually recursive functions let rec isOdd n = if n = 0 then false elif n = 1 then true else isEven (n - 1) and isEven n = if n = 0 then true elif n = 1 then false else isOdd (n - 1);; val isOdd : int -> bool val isEven : int -> bool > isOdd 13;; val it : bool = true Please keep the formatting the same. Bolding the 'error FS0039: ...' and in the second code example the keywords 'rec' and 'and'.

Laurion Burchall  Nov 05, 2009 
PDF
Page 56
Regex incomplete active pattern

The regex patterns supplied for the Regex incomplete active pattern example all start with $ and end with ^. This is backwards; ^ indicates the beginning of input and $ indicates the end of input.

Note from the Author or Editor:
Noted.

Adam Merz  Aug 28, 2010 
Printed
Page 56
Third code example

Possible mistake in the line > let (~+++) x y z = x + y + z;; let (~+++) x y z = x + y + z;; -----^^^^ stdin(27,6): error FS1208: Invalid operator definition. Prefix operator definitions must use a valid prefix operator name. I suspect this may be due to the rules governing valid operators apparently having changed prior to the language's final release:- http://stackoverflow.com/questions/2304120/f-what-are-the-valid-prefix-operators

Note from the Author or Editor:
Yes, you are correct. As linked in that StackOverflow post, a more recent version of the F# spec (April, 2010) is online at: http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/manual/spec.html This will get updated in a future printing.

Anonymous  Jan 10, 2011 
Printed
Page 62
before "Pattern Matching"

val it : int list list = <1]; [4; 5; 6]; [3; 4]; [9> should be val it : int list list = [[1]; [4; 5; 6]; [3; 4]; [9]]

Note from the Author or Editor:
Yup, the submitter had it exactly right. On page 62: val it : int list list = <1]; [4; 5; 6]; [3; 4]; [9> should be: val it : int list list = [[1]; [4; 5; 6]; [3; 4]; [9]]

Anonymous  Feb 18, 2010 
Printed
Page 68
testXor function

the testXor function is internally logically inconsistent, and throws exceptions. | tuple when fst tuple = snd tuple -> true Here whenever x and y are the same the method returns true. | true, true -> false | false, false -> false Neither of these lines will ever match since true has already been returned for these cases above. These calls throw exceptions: testXor true false testXor false true

Note from the Author or Editor:
The code snippet on Page 68 should read as follows: (=) replaced with (<>) let testXor x y = match x, y with | tuple when fst tuple <> snd tuple -> true | true, true -> false | false, false -> false

Magnus Lidbom  Nov 08, 2009 
Printed
Page 80
Example 3-11 (bottom of page)

Two problems: First, the text says "Example 3-11 defines a sequence of all possible 32-bit integers represented as strings". The example actually tries to generate all possible *positive* 32-bit integers represented as integers. Second, the syntax of the sequence expression is to be wrong. Instead of '{for i = 0 to System.Int32.MaxValue ->' you have to use '{for i in 0 .. System.Int32.MaxValue ->'. So, the corrected example might be something like: let allIntsSeq = seq { for i = System.Int32.MinValue to System.Int32.MaxValue -> sprintf "%d" i } val allIntsSeq : seq<string>

Note from the Author or Editor:
This is actually pretty far off. The text above Example 3-11 needs to read: Example 3-11 defines a sequence of all positive 32-bit integers. It then tries to create an equivalent list, but fails due to memory. The code then should read as follows. (Changing -> to 'do yield') > // Sequence of all integers let allIntsSeq = seq { for i = 0 to System.Int32.MaxValue do yield i };; val allIntsSeq : seq<int> > allIntsSeq;; val it : seq<int> = seq [0; 1; 2; 3; ...] > // List of all integers - ERROR: Can't fit in memory! let allIntsList = [ for i = 0 to System.Int32.MaxValue do yield i ];; System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.

Laurion Burchall  Nov 06, 2009 
Printed
Page 82
Seq.unfold section

The two references to Seq.tolist on pages 82 and 83 should be Seq.toList.

Note from the Author or Editor:
On page 82 at the bottom of the paragraph "... uses the Seq.tolist function" should read "... uses the Seq.toList function" (with a capitol L). Similarly, on page 83 "> Seq.tolist fibsUnder100;;" should read "> Seq.toList fibsUnder100"

Steve Hunley  Jan 14, 2010 
Printed
Page 82
Example 3-13 comment

In the comment for example 3-13, "give" should be "given."

Note from the Author or Editor:
Yes, there is a typeo in the code comment. ... of the Fibonacci sequence give the previous ... should be replaced with ... of the Fibonacci sequence given the previous ...

Steve Hunley  Jan 14, 2010 
PDF
Page 89
code sample

val x : int array = [|0|] val y : int array = [|0|] val it : int array = [|3|] val it : int array = [|3|] should be: val x : int [] = [|0|] val y : int [] = [|0|] val it : int [] = [|3|] val it : int [] = [|3|] maybe F# 2.0 syntax changed.

skyiv  May 07, 2010 
PDF
Page 93
1st code sample

val perfectSquares : int array val it : int array = [|1; 4; 9; 16; 25; 36; 49|] val perfectSquares2 : int array should be: val perfectSquares : int [] = [|1; 4; 9; 16; 25; 36; 49|] val it : int [] = [|1; 4; 9; 16; 25; 36; 49|] val perfectSquares2 : int [] = [|1; 4; 9; 16; 25; 36; 49; 64; 81|] maybe F# 2.0 syntax changed.

skyiv  May 07, 2010 
PDF
Page 94
The last line

val alphabet : char array should be: val alphabet : char [] = ...

skyiv  May 07, 2010 
PDF
Page 96
The last code example

val it : float array val emptyIntArray : int array val emptyStringArray : string array should be: val it : float [] val emptyIntArray : int [] val emptyStringArray : string []

Note from the Author or Editor:
Yup, thanks for your feedback.

skyiv  May 07, 2010 
PDF
Page 98
1st code example

val it : int array * int array should be: val it : int [] * int []

skyiv  May 07, 2010 
PDF
Page 99
2nd code example

val vowels : char array should be: val vowels : char []

Note from the Author or Editor:
On page 99, the code example with text: val vowels : char array Should replaced with the following: val vowels : char []

skyiv  May 07, 2010 
Printed
Page 115
Both words are in the same pharagraph.

The word 'overwritten' should be replaced 'overridden'. This occurs twice on the page. The text "several methods that can be overwritten or customized." should be replaced with "several methods that can be overridden or customized." The text "some of these methods are overwritten by the F# compiler." should be replaced with "some of these methods are overridden by the F# compiler."

Note from the Author or Editor:
The word 'overwritten' should be replaced 'overridden'. This occurs twice on the page. The text "several methods that can be overwritten or customized." should be replaced with "several methods that can be overridden or customized." The text "some of these methods are overwritten by the F# compiler." should be replaced with "some of these methods are overridden by the F# compiler."

Chris Smith
Chris Smith
O'Reilly Author 
Oct 31, 2009 
Printed
Page 117
1st paragraph

errata listed for page 115 ... is actually on page 117. i.e., replace 'overwritten' with 'overridden'

richard boyd  Nov 20, 2009 
Printed
Page 125
code on upper part of page

Errata error listed for page 132 ... is actually on page 125. Replacing 'new Point()' with 'new Point3()'

richard boyd  Nov 20, 2009 
Printed
Page 132

The constructors should be calling type Point3 and not Point. "new() = new Point(0.0, 0.0)" should be replaced with: "new() = new Point3(0.0, 0.0)". And later in the example "new Point(x, y)" should be replaced with: "new Point3(x, y)".

Note from the Author or Editor:
The constructors should be calling type Point3 and not Point. "new() = new Point(0.0, 0.0)" should be replaced with: "new() = new Point3(0.0, 0.0)". And later in the example "new Point(x, y)" should be replaced with: "new Point3(x, y)".

Chris Smith
Chris Smith
O'Reilly Author 
Oct 31, 2009 
Printed
Page 139
Both words are in the same pharagraph.

The word 'overwritten' should be 'overridden' The phrase "that virtual methods cannot be overwritten." should read "that virtual methods cannot be overridden."

Note from the Author or Editor:
The word 'overwritten' should be 'overridden' The phrase "that virtual methods cannot be overwritten." should read "that virtual methods cannot be overridden."

Chris Smith
Chris Smith
O'Reilly Author 
Oct 31, 2009 
Printed
Page 141
2nd paragraph

Errata listed on page 139 ... is actually on page 141. Replacing 'overwritten' with 'overridden'.

richard boyd  Nov 20, 2009 
Printed
Page 206
Example 8-1

The unary negation operator in the example is written as: rhs.Volume * -1.0<1> This confused me because the dimensionless measure isn't discussed in the section on units of measure.

Note from the Author or Editor:
Dimensionless units of measure are not mentioned in the book. Rather than leaving it to potentially confuse readers, I'll remove it from the book. Please change the following code snippet (removing the '<1>'): ... new Bottle(rhs.Volume * -1.0<1>) ... to ... new Bottle(rhs.Volume * 1.0) ...

Laurion Burchall  Nov 10, 2009 
PDF
Page 207
Warning

In the warning slice the list of binary operators that support other CLI languages don't include: <,<=,>,>=,=,<> and this operators are supported on the CLI as well. For example given the code: type Foo(power) = member public x.Power with get() = power static member public (<=) (a : Foo, b : Foo) = a.Power <= b.Power The F# 2.0 compiler will throws a warnings like the following. Warning 1 The name '(<=)' should not be used as a member name. To define comparison semantics for a type, implement the 'System.IComparable' interface. If defining a static member for use from other CLI languages then use the name 'op_LessThanOrEqual' instead. If you check the IL object code from the C# point of view you get: public static bool operator <=(Bar.Foo a, Bar.Foo b) { return LanguagePrimitives.HashCompare.GenericLessOrEqualIntrinsic<IComparable>(a.Power, b.Power); }

Note from the Author or Editor:
Noted.

Horacio Nuñez  Sep 18, 2010 
Printed
Page 214
Example 8-8 Create proactive types

'min' should be replaced with 'max' in the following line of code: m_amountLeft <- min (m_amountLeft - amount) 0.0<ml> otherwise the cup gets empty whenever the method Drink is called

Note from the Author or Editor:
Yes, the code example should be updated to read: m_amountLeft <- max (m_amountLeft - amount) 0.0<ml>

Faisito  Nov 19, 2009 
Safari Books Online, Other Digital Version
Page 251
2nd code example on the page

Why is initial state returned below instead of updated state like in the others: // do! ClickButton "Search" let step3 = StatefulFunc(fun initialState -> let result, updatedState = ClickButton "Search" initialState result, initialState)

Note from the Author or Editor:
That is unfortunately an error in the book, it should return updatedState like you point out.

Hoop Somuah  Apr 05, 2011 
Printed
Page 251
code at bottom of page

should the line: updatedState3 |> (fun initialState -> be updatedState2 |> (fun initialState -> (ie state 2 not 3 being passed)

Note from the Author or Editor:
Yes, that was an error in the first edition of the book.

robin field  Apr 06, 2012 
Printed
Page 255
Example code, middle of page

// Now run our SatefulFunc passing in an initial state SatefulFunc -> StatefulFunc

Note from the Author or Editor:
Please change the text: ... // Now run our SatefulFunc passing in an ... to ... // Now run our StatefulFunc passing in an ...

Laurion Burchall  Nov 11, 2009 
PDF
Page 262
2nd code example

val millionOnes : int array should be: val millionOnes : int []

skyiv  May 07, 2010 
Printed
Page 264
Example 11-4

withdrawl -> withdraw

Note from the Author or Editor:
In the code snippet (Example 11-4) the text: ... Locking %s's account to withdrawl funds ... should read: ... Locking %s's account to withdraw funds ...

Laurion Burchall  Nov 08, 2009 
Printed
Page 279
Middle of page 279

The text of the bulleted list needs to change, from: ----------------- Accessing Result will do one of three things: * Return the task's stored result if the task has already completed. * Wait for the task to complete if it has already started. * Start executing the task on the current thread if it hasn't begun executing. ----------------- to: ----------------- Accessing Result will do one of two things: * Immediately return the task's stored result if the task has already completed. * Block until the task has completed. -----------------

Chris Smith
Chris Smith
O'Reilly Author 
Apr 07, 2010 
Printed
Page 324
Example 13-7

In the comment that start with "// Get the 'MethodInfo'..." arithmatic -> arithmetic

Note from the Author or Editor:
Yes, there is a typeo in the comment on page 324. The word 'armathmatic' should be spelt 'arithmetic'.

Laurion Burchall  Nov 12, 2009 
PDF
Page 336
Notes

Note that the code references the Greeters namespace should be: Note that the code references the GreetersNamespace namespace

Note from the Author or Editor:
Noted.

skyiv  May 07, 2010 
PDF
Page 339
Table A-1

Characters other than . $ { [ ( | ) ] } * + ? are matched verbatim. should be: Characters other than . $ { [ ( | ) ^ \ * + ? are matched verbatim. Used to escape metacharacters, such as matching . $ { [ ( | ) ] } * + ? should be: Used to escape metacharacters, such as matching . $ { [ ( | ) ^ \ * + ?

Note from the Author or Editor:
The poster said it all, thanks.

skyiv  May 07, 2010 
PDF
Page 339
Table A-1

\s Matches any whitespace character Details: \s Matches any white-space character. It is equivalent to [\f\n\r\t\v\x85\p{Z}]. If ECMAScript-compliant behavior is specified, \s is equivalent to [\f\n\r\t\v]. Refer: http://msdn.microsoft.com/en-us/library/20bw873z.aspx#WhitespaceCharacter

Note from the Author or Editor:
Noted.

skyiv  May 07, 2010 
PDF
Page 341
code example

let tagPairs = new Regex(@"\[(^\])+\]") let comments = new Regex(@"\{(^\})+\}") should be: let tagPairs = new Regex(@"\[[^\]]+\]") let comments = new Regex(@"\{[^\}]+\}")

Note from the Author or Editor:
Noted.

skyiv  May 08, 2010 
PDF
Page 343
1st code example

val printGameMoves : unit -> unit > printGameMoves();; should be: val listMoves : unit -> unit > listMoves();;

Note from the Author or Editor:
Good eye to detail! Thank you for the feedback.

skyiv  May 07, 2010 
PDF
Page 344
paragraph above Example A-9

The example uses the (|Match3|_|) should be: The example uses the (|RegexMatch3|_|)

Note from the Author or Editor:
In the paragraph right above Example A-9, please change: "The example uses the (|Match3|_|) partial active pattern..." to "The example uses the (|RegexMatch3|_|) partial active pattern..."

skyiv  May 07, 2010 
PDF
Page 344
3rd paragraph & Example A-9

List.tl is used to skip the first group’s value should be: List.tail is used to skip the first group’s value match (List.tl [ for g in result.Groups -> g.Value ]) with should be: match (List.tail [ for g in result.Groups -> g.Value ]) with In F# 2.0, List.tl changed to List.tail

skyiv  May 08, 2010 
PDF
Page 345
above 'Writing XML' section

friendlier library in System.Linq.XML.dll which will be covered here. should be: friendlier library in System.Xml.Linq.dll which will be covered here.

Note from the Author or Editor:
Doh, sorry about that.

skyiv  May 07, 2010 
PDF
Page 348
2nd code example

val computeFileContents : unit -> string array should be: val computeFileContents : unit -> string []

skyiv  May 07, 2010 
Printed
Page 349
Warning snippet, first paragraph

It says [<Serializeable>], it should say [<Serializable>]

Note from the Author or Editor:
On page 349 there is a 'warning' with text "[<Serializeable>]". That should read "[<Serializable>]" (without that extra e).

Bernadette Martinez-Hernandez  Dec 17, 2009 
PDF
Page 353
The last line

val wordsInBook : Set<string> should be: val wordsInBook : Set<string> = ...

skyiv  May 07, 2010 
PDF
Page 354
2nd code example

if Map.contains word acc then should be: if Map.containsKey word acc then

Note from the Author or Editor:
Yup, the code in the middle of the page which reads: if Map.contains word acc then should be: if Map.containsKey word acc then

skyiv  May 07, 2010 
PDF
Page 372
index

BigInt type, 17 should be: bigint type, 17

skyiv  May 07, 2010