The Artima Developer Community
Sponsored Link

Programming in Scala Forum
Bug in section 8.4

0 replies on 1 page.

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 0 replies on 1 page
Per Wigren

Posts: 2
Nickname: 54027
Registered: Feb, 2008

Bug in section 8.4 Posted: Feb 17, 2008 9:56 AM
Reply to this message Reply
Advertisement
This method:

def filesRegex(query: String) =
filesMatching(_.contains(query))

should be:

def filesRegex(query: String) =
filesMatching(_.matches(query))

The bug is in the middle of page 157 in the version downloaded february 15.

BTW, thanks for a great book! I think it's very pedagogic. I haven't programmed in neither Scala nor Java at all before and I have very limited experience with functional programming, but so far (at page 157) I haven't had a single moment where I couldn't figure out how something works. I've had many "wow, cool!" moments though. I'm a professional UNIX admin and Ruby programmer and I know my way around C, C++, sh, Python, Awk and many other non-functional languages. I'm looking forward to continue reading the book and even more to actually start using Scala for something non-trivial (whatever it might be).

Topic: Bug in Page 124 Previous Topic   Next Topic Topic: Could we have a chapter on unit testing please?

Sponsored Links



Google
  Web Artima.com   

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