The Artima Developer Community


Errata for Programming in Scala
Chapter 6: Functional Objects
Return to errata index.

Page na (PDF page 0):
In the HTML version
(http://www.artima.com/pins1ed/functional-objects.html) I can read in the
first sentence:

A rational number is a number that can be expressed as a ratio n/d, where
null and null are integers, except that null cannot be zero. null is
called the numerator and null the denominator. 

Please correct the "null".

Thank you

[FIXED (Thanks!)]
Page 0 (PDF page 0):
Right at the top, under 6.1, it says:
"A rational number is a number that can be expressed as a ratio n/d,
where null and null are integers, except that null cannot be zero. null
is called the numerator and null the denominator."
I don't believe the "null"s here are intended ;)

[FIXED (Thanks!)]
Page 102 (PDF page 146):
The lessThan method will yield the wrong result if exactly one of the
denominators is negative.
Page 111 (PDF page 155):
In listing 6.5, the add (+) and subtraction (-) method definitions where
the parameter is an Int, it occurs to me that in keeping with DRY might
be better written as:

def + (i: Int): Rational = this + new Rational(i)

and

def - (i: Int): Rational = this - new Rational(i)

Page number: Book type: Paperback book PDF eBook
Book version: (Or build date. Found on back of title page.)
Your feedback:
Your name: (optional)
Your email address: (optional) (will not be published)

Copyright © 2024 Artima, Inc. All rights reserved.