The Artima Developer Community
Sponsored Link

Programming in Scala Forum
mis-matched names in code sample on page 155

1 reply on 1 page. Most recent reply: Apr 25, 2008 9:03 PM by Zemian Deng

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Hunter Kelly

Posts: 4
Nickname: retnuh
Registered: Apr, 2003

mis-matched names in code sample on page 155 Posted: Apr 25, 2008 10:14 AM
Reply to this message Reply
Advertisement
On page 155 is a small code snippit:

def gcd(x: Long, y: Long): Long =
if (b == 0) a else gcd(b, a % b)


the formal params are x and y, but you use a and b in the body of the method.


Zemian Deng

Posts: 49
Nickname: zdeng
Registered: Jan, 2008

Re: mis-matched names in code sample on page 155 Posted: Apr 25, 2008 9:03 PM
Reply to this message Reply
If you click on suggest link on that page, you will see this has been reported many times. Hopefully they will fix it on next edition.

Flat View: This topic has 1 reply on 1 page
Topic: where is my book? Previous Topic   Next Topic Topic: thinko on p70

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use