Created
February 17, 2017 16:27
-
-
Save dos65/e208eb8277a3021af5756d3583ad699c to your computer and use it in GitHub Desktop.
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> def showInt(i: Int): String = s"Int: $i" | |
showInt: (i: Int)String | |
// Это вообще легально?? replace это метод строки, а не функции | |
scala> val haha = showInt(_: Int).replace("Int: ", "") | |
haha: Int => String = <function1> | |
scala> haha(2) | |
res20: String = 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment