lambda
lambda copied to clipboard
Fun with λ calculus!
λ
Fun with Lambda Calculus in JS
Exploring:
$ node lambda.js

Fiddling with it (npm install first):
$ npm test
Notes:
-
These are functions all the way, so expect your stack to grow real quick! :smile: You can increase it if you want with node's parameter
--stack-size=<n>, as you can see in the test npm script. -
I cheated a bit when using named lambda abstractions (for the sake of readability)
References:
- Lambda Calculi, by Shane Steinert-Threlkeld
- Lambda Calculus - Wikipedia
- Church Encoding - Wikipedia
- Programming with Nothing, by @tomstuart
- Fun with the Lambda Calculus, by @coreyhaines
- Types and Programming Languages (chapter 5, "The Untyped Lambda-Calculus") , by Benjamin C. Pierce
I hope you enjoy reading it as much as I enjoyed doing it! :heart: Perhaps you could add more examples…? :smile: