Lambda Calculus in Clojure (Part 2)

In Part 1, we built a boolean algebra using Church Encoding. In this post, we are going to reuse some of the previous work to build a similar algebra, this time for numerals. Church numerals In the algebra we built in the previous post, Church booleans were encoded using higher-order functions. The way Church numerals are represented is similar: given a number n and a function f, the Church numeral of n is the number of times f encapsulates n. For example, for n = 3, the function f encapsulates n three times: ...

January 24, 2018 · 7 min · srodrigo

Lambda Calculus in Clojure (Part 1)

Lambda Calculus is the smallest programming language. As we saw on my previous post, the only building blocks available are functions, variables and expressions. There are no built-in primitive values or operations. How can we then solve real-world problems using Lambda Calculus? In this post, we are going to create a set of building blocks, using lambda expressions, to calculate boolean expressions. For this, we are going to use Clojure, which is a dynamic functional language based on Lambda Calculus. ...

December 14, 2017 · 6 min · srodrigo

Lambda Calculus for mortal developers

Lambda Calculus for mortal developers Lambda Calculus sounds like an arcane term that only functional programming wizards can understand. Nothing could be further from the truth. We use Lambda Calculus everyday when we program. It is the most reducible form of all Functional Programming languages; the primitive building block of Functional Programming. The atoms of Lambda Calculus Lambda Calculus is based on three basic building blocks: expressions, variables and functions, which are combined to form other expressions. ...

November 9, 2017 · 7 min · srodrigo