Skip to content

Instantly share code, notes, and snippets.

@kadirmalak
Created December 28, 2019 16:01
Show Gist options
  • Save kadirmalak/b627dd061e3765e457717f3bc6215871 to your computer and use it in GitHub Desktop.
Save kadirmalak/b627dd061e3765e457717f3bc6215871 to your computer and use it in GitHub Desktop.
currying in scala nested
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