church-encoding
Church Encoding in JavaScript.
Operations available
- ifThenElse
Arithmetical
- successor
- addition
- multiplication
- exponentiation
- predecessor
- subtraction
Logical
- trueExpression
- falseExpression
- andOperation
- orOperation
- notOperation
- xorOperation
- nandOperation
- xnorOperation
- norOperation
Predicates
- isZero
- isLessOrEqual
- isGreaterOrEqual
- areEqual
- areNotEqual
- isLess
- isGreater
Helpers
- churchToInteger
- integerToChurch
Install
$ npm install --save church-encoding
Usage
var churchEncoding = ; //=> Exposes all functions mentioned above