File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed
src/script/scala/progscala3/fp/basics Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change 11// src/script/scala/progscala3/fp/basics/PartialApplication.scala
2-
3- // The book uses a slightly different version of the "cat1" examples, because
4- // there's a bug in the Scala 3.1 support that causes the line "val fcat1 = cat1"
5- // to report this error:
6- // 1 |val fcat1 = cat1
7- // | ^^^^
8- // | The syntax `<function> _` is no longer supported;
9- // | you can simply leave out the trailing ` _`
10- // Therefore, I left that example out of the book completely, just including fcat1b.
11- // If you compile with the default `-source 3.0`, then that line will work fine.
12- // However, the compilation and sbt console use `-source 3.1`.
2+ // The book uses a slightly shorter version of the following:
133
144def cat1 (s1 : String )(s2 : String ) = s1 + s2
155def cat2 (s1 : String ) = (s2 : String ) => s1 + s2
You can’t perform that action at this time.
0 commit comments