Created
December 28, 2019 16:01
-
-
Save kadirmalak/b627dd061e3765e457717f3bc6215871 to your computer and use it in GitHub Desktop.
currying in scala nested
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
def nestedCurrying(a: Int)(b: String)(c: Double) = { | |
println("a: " + a + ", b: " + b + ", c: " + c) | |
} | |
def g1 = nestedCurrying(1) _ // we pass first param | |
def g2 = g1("str") // and then second param | |
g2(3.14) // and use it with third param | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment