1.0.8 • Published 7 years ago

languagewars-churchnumerals-js v1.0.8

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

Language Wars - Church numerals - legacy JavaScript

npm install Travis Build Status CircleCI Build Status Build Status CircleCI Dependencies Status Known Vulnerabilities Downloads License

Implementation of Church numerals in legacy JavaScript

Implemented functions:

  1. suc = λa.λb.λc.b(a b c)
  2. add = λa.λb.λc.λd.a c (b c d)
  3. mul = λa.λb.λc.a (b c)
  4. exp = λa.λb.b a
  5. pre = λa.λb.λc.a (λd.λe.e (d b)) (λf.c) (λg.g)
  6. sub = λa.λb.b pre a

Conversion functions:

  • ntc - number to Church encoding conversion
  • ctn - Church encoding to number conversion

Implementation:

Tests:

Implementations in other languages:

All topics:

Issues

For any bug reports or feature requests please post an issue on GitHub.

Author

Rafał Pocztarski Follow on GitHub Follow on Twitter Follow on Stack Exchange

License

MIT License (Expat). See LICENSE.md for details.

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago