Use Lambda Calculus To Think About Functional Programming

A fun way to reason

Mary Paskhaver
Geek Culture

--

Faded background: The sun shining over clouds. Foreground: ((λx.M) N).
Background photo by Nic Y-C on Unsplash.

I learned about lambda calculus this past semester. It was covered in a course called Principles of Programming Languages. Learning this formal system was supposed to help us students understand functional programming. In other words, to get comfortable with:

  • Programs made by applying functions instead of running statements in some order.
  • Functions reading in other functions as arguments.
  • Functions returning other functions.

Lambda calculus certainly helped me with that. Plus, it presented me with a totally new way of expressing programming constructs.

So, let’s talk briefly about lambda calculus and why it’s useful.

What is lambda calculus?

Lambda calculus was developed by Alonzo Church in the 1930s. It is a system of defining everything as functions. Objects are functions. Operations are functions. Numbers are functions.

This is less complicated than one might think.

Lambda calculus follows certain syntactical rules to define these things. Valid expressions in lambda calculus are called lambda terms. They consist of the following:

--

--

Mary Paskhaver
Geek Culture

Student and mobile app developer. Follow me for tips on tech, work, and more.