Lambda Calculus - Church Numerals

So while I was surfing on the internet, I bumped into things I picked when I was in school, lambda calculus being one of them. Now, I admit I’m not a theoretician or even a computer scientist, but this really amazed when I first learned it.

So it seems to me the great computer scientist, Alonzo Church, famously known for the Church–Turing thesis and lambda calculus (foundation of functional programming), had a problem he had to solve.

He had to define (almost) everything computable in functions, so he could come up with lambda calculus. And he couldn’t do it without first defining the natural numbers (0,1,…) with functions, so he went ahead and did that.

And the screenshot (2nd screenshot, obviously ;)) below was how he did it. By applying the function f, to the function x, n times, to replicate the idea of a natural number.

lamb.jpg

Screen Shot 2019-04-02 at 3.42.49 PM.png

 
2
Kudos
 
2
Kudos

Now read this

Generate Programs from Spreadsheets

The other day, my friend told me his product manager often times have trouble translating his financial models in spreadsheet to code, so he can test his ideas on larger datasets, because he is the one that has to come up with the... Continue →