Module lambda_calculus::arithmetic
[−]
[src]
Functions
| eq |
Applied to two Church-encoded numbers it returns a Church-encoded boolean indicating whether its first argument is egual to the second one. |
| is_zero |
Applied to a Church-encoded number it produces a Church-encoded boolean, indicating whether its argument is equal to zero. |
| leq |
Applied to two Church-encoded numbers it returns a Church-encoded boolean indicating whether its first argument is less or egual to the second one. |
| mult |
Applied to two Church-encoded numbers it produces their product. |
| one |
Produces a Church-encoded one. |
| plus |
Applied to two Church-encoded numbers it produces their sum. |
| pow |
Applied to two Church-encoded numbers it raises the first one to the power of the second one. |
| pred |
Applied to a Church-encoded number it produces its predecessor. |
| sub |
Applied to two Church-encoded numbers it subtracts the second one from the first one. |
| succ |
Applied to a Church-encoded number it produces its successor. |
| to_cnum |
Produces a Church-encoded term with a value of the given natural number. |
| zero |
Produces a Church-encoded zero. |