Intro to Lambda Calculus

I watched an amazing video the other day that showed me an aspect of math and computer science that I’ve surprisingly neglected throughout my degree. It’s called Lambda Calculus, created by Alonzo Church, and it’s a formal system designed to express computation purely through function abstraction, application, and substitution.

Functions

Applying Functions

Currying

Currying transforms a function that takes multiple arguments into a series of single-argument functions. This is useful since Lambda Calculus requires that every function takes exactly one input.

Here’s how it looks in Lambda notation:

λx.λy.x + y

Applying the curried function:

If we apply this function to inputs 1 and 2, it looks like:

(λx.λy.x+y) 1 2

Performing beta reductions step-by-step:

β(λy.1+y) 2 β(1+2) = 3

Currying lets us break down multi-argument functions into simpler, composable building blocks. This is fundamental in functional programming languages like Haskell and helps with modularity and partial application.