(no title)
carlineng | 2 years ago
He does a wonderful job of taking very dense mathematical notation and explaining it in ways that anyone can understand. He derives the basic concepts of the lambda calculus from the ground up using Python. Super fun to follow along with.
photochemsyn|2 years ago
https://youtu.be/OLH3L285EiY
successor function: given a number, get the next number
try this in Python:
zero = lambda f: lambda x: x
one = lambda f: lambda x: f(x)
two = lambda f: lambda x: f(f(x))
to_int = lambda n: n(lambda i: i+1)(0)
succ = lambda n: lambda f: lambda x: f(n(f)(x))
three = succ(two)
four = succ(three)
to_int(four)
So that's just counting, the Church Numerals, where it begins.
throwawaylinux|2 years ago
cloudripper|2 years ago
johnmw|2 years ago
johnmw|2 years ago