In [1]:
def f(a: Int, b: Double) = a + b
In [4]:
// Provide b only
// g is now a function that only takes an Int (first argument)
def g = f(_: Int, 2d)
In [6]:
// g: Int => Double
g
In [5]:
g(2)
In [8]:
// Provide "a" only
def h = f(1, _: Double)
In [9]:
h
In [10]:
h(3d)
In [11]:
val f = (a: Int, b: Double, c: String) => a + b + c
In [13]:
// Curry it
val fCurried = f.curried
In [14]:
fCurried(1)
In [ ]:
fCurri
Thanks to @deaktator for explaining these to me