church-wars-es6
v1.0.5
Published
Church Wars - ES6
Downloads
2
Readme
Church Wars - ES6
Implementation of Church numerals in ES6 JavaScript
Implemented functions:
- suc = λa.λb.λc.b(a b c)
- add = λa.λb.λc.λd.a c (b c d)
- mul = λa.λb.λc.a (b c)
- exp = λa.λb.b a
- pre = λa.λb.λc.a (λd.λe.e (d b)) (λf.c) (λg.g)
- sub = λa.λb.b pre a
Conversion functions:
- ntc - number to Church encoding conversion
- ctn - Church encoding to number conversion
Implementation:
Tests:
See also:
Issues
For any bug reports or feature requests please post an issue on GitHub.
Author
License
MIT License (Expat). See LICENSE.md for details.