-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exercise 2.1.7.1 honour comment #23
Comments
BTW will do that as exercise, however, not convinced WRT rationale behind. Because using pattern match of |
The reason is that Suppose you are writing So, writing |
Okay, did a little check with List:
|
Signed-off-by: Andreas Roehler <andreas.roehler@online.de>
#23, Exercise 2.1.7.1 honour comment, pattern-match on tuple
@winitzki commented [...]
In chapter02/worksheets/solution2.1.7.1_AR.scala:
+val a = (0 to 9).flatMap(x => (0 to 9).map { y => (x, y) } )
+val b = a.map{ case x => x._1 + 4 * x._2 }
I would suggest to use case (x, y) => here as well.
The text was updated successfully, but these errors were encountered: