3 ms·
A while ago I wrote a Brainfuck interpreter in lambda calculus. I abused the Clojure macro system to make my job a little easier, and of course, I wrapped it in
by MBlume 10y ago
A while ago I wrote a Brainfuck interpreter in lambda calculus. I abused the Clojure macro system to make my job a little easier, and of course, I wrapped it in an interface that could do IO, but this does compile to a single pure lambda calculus function which takes a (church encoded) brainfuck program and input string and returns an output string.
https://github.com/MichaelBlume/lambdafuck/blob/master/src/lambdafuck/core.clj https://github.com/MichaelBlume/lambdafuck/blob/master/src/l...
- tromp 10y agoI also wrote one at http://tromp.github.io/cl/Binary_lambda_calculus.html#Brainfuck http://tromp.github.io/cl/Binary_lambda_calculus.html#Brainf... to demonstrate the invariance theorem.