
Math notation

f(x, y, z) = 5x + 4y + 3z

f(4 5 6)

g(y, z) = f(4, y, z)  // partial application

h(z) = f(4, 5, z)     // partial application


Haskell notation

f x y z = 5*x + 4*y + 3*z

f 4 5 6

g = f 4     // partial application

h  = f 4 5  // partial application


Scheme notation

(define f (lambda (x y z) (+ (* 5 x) (* 4 y) (* 3 z)))

(define fc (lambda (x) 
             (lambda (y) ; x is free in this lambda
               (lambda (z) (+ (* 5 x) (* 4 y) (* 3 z)))))) ; x, y are free in this lambda

(f 4 5 6)       ; uncurried version of f

(((fc 4) 5) 6)  ; curried version of f

(define g (fc 3))      ; partial application

(define h ((fc 5) 8))  ; partial application


; an alternative way to curry the function f
(define fco (lambda (x y)
              (lambda (z) (+ (*5 x) (*4 y) (* 3 z)))))
            
(define h (fco 5 8))  ; partial application
