church-wars-js

1.0.5 • Public • Published

Church Wars - JS

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

Implementation of Church numerals in original 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:

See also:

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.

Readme

Keywords

none

Package Sidebar

Install

npm i church-wars-js

Weekly Downloads

5

Version

1.0.5

License

MIT

Last publish

Collaborators

  • rsp