Created
April 13, 2018 11:19
-
-
Save quiye/920363eb1e61c64c29de5f9dc33a4483 to your computer and use it in GitHub Desktop.
?.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scala> List(1,2,3).map({println("1");_+1}).map({println("a"); _+1}) | |
1 | |
a | |
res21: List[Int] = List(3, 4, 5) | |
scala> List(1,2,3).map({println("1");_+1}).map(a=>{println("a"); a+1}) | |
1 | |
a | |
a | |
a | |
res22: List[Int] = List(3, 4, 5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
理由がわかった。
となるが、よくみると