File tree Expand file tree Collapse file tree 2 files changed +1
-8
lines changed
main/scala/progscala3/forcomps
script/scala/progscala3/forcomps Expand file tree Collapse file tree 2 files changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -39,13 +39,6 @@ object LoginFormValidatorNec:
3939 }
4040end LoginFormValidatorNec
4141
42- /**
43- * This method uses the matching clauses shown rather something like this:
44- * assert(LoginFormValidatorNec("123 45", "678 90") ==
45- * Invalid(Chain(BadCharacters("user name"), BadCharacters("password"))))
46- * This is necessary because we use -language:strictEquality, which causes
47- * these == expressions to fail compilation!
48- */
4942@ main def TryLoginFormValidatorNec =
5043 import LoginFormValidatorNec .*
5144 assert(LoginFormValidatorNec (" " , " " ) ==
Original file line number Diff line number Diff line change 99var r1 = 0
1010result1.foreach(i => r1 = i * 2 )
1111var r2 = 0
12- result2.foreach(i => r1 = i * 2 )
12+ result2.foreach(i => r2 = i * 2 )
1313
1414val r3 = result1.map(_ * 2 )
1515val r4 = result2.map(_ * 2 )
You can’t perform that action at this time.
0 commit comments