f(x, y, z) = x + y + z g(y, z) = f(5, ., .) = 5 + y + z g(y, z) = f(5, y, z) = 5 + y + z h(y) = g(., 7) = f(5, ., 7) = 5 + y + 7 h(y) = g(y, 7) = f(5, y, 7) = 5 + y + 7 f(x=5, y, z=7) = x + y + z f(4) h(4) h(y) = g(., 9) = f(3, ., 9) = 5 + y + 9 h(y) = g(y, 7) = f(3, y, 7) = 5 + y + 9 h(4) f(x, y, z) = x + y + z h(x, y) = f(x, y, 10) = x + y + 10 g(x, y) = f(x, y, -1) = x + y + -1 k(y) = f(3, y, 12) = 3 + y + 12 f(x, y) = x - y g(x) = f(x, 10) = 10 - x h(y) = f(10, y) = y - 10 curried function: partial application of a function of several variables that returns a new function f x = x*x // function definition f 4 = 16 // function application f x y z = x + y + z // function definition f 1 2 3 = 6 // function application f 1 = (y,z) => 1+y+z // f 1 returns a function of two variables f 1 5 = (z) => 1 + 5 + z // f 1 5 returns a function of one variable f 1 = [(y,z) => x+y+z, (x=1)] // f 1 returns a closure, an IPEP pair f 1 5 = [(z) => x + y + z, (x=1, y=5)] // f 1 5 returns a closure, an IPEP pair h = f 1 j = f 1 5 g(a, b) = 2*a + 3*b g(2) // not allowed g(2, b) // not allowed In the ML programming language, the function fun f x y z = x + y + z; is automatically "curried" into this "function factory" form using closures. val f = fn x => fn y => fn z => x + y + z; In the JavaScript language, I can take the function function f(x, y, z) {return x + y + z;} and I can "curry" the function myself function f(x){return function(y){return function(z){return x + y + z}}}