Skip to content

Instantly share code, notes, and snippets.

@dos65
Created February 17, 2017 16:27
Show Gist options
  • Save dos65/e208eb8277a3021af5756d3583ad699c to your computer and use it in GitHub Desktop.
Save dos65/e208eb8277a3021af5756d3583ad699c to your computer and use it in GitHub Desktop.
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