Module lambda_types::math
source · Expand description
Function types relating to church numerals and mathematics.
The const-numeral
feature flag, off by default, adds a wrapper to allow converting any church numeral to a number.
This flag requires #![feature(generic_const_exprs)]
.
Structs§
- Adds two church numerals.
- Increments a
ConstNumber
by one. Used to defineToNumber
. - Constant number returned by converting a church numeral.
- Returns whether two numbers are equal.
- Raises a numeral to the power of another.
- Returns whether a number is zero.
- Returns whether one number is less than or equal to another.
- Multiplies two church numerals - this is simply composition.
- Predecessor function. Gets the number below a given church numeral.
- Subtracts two church numerals.
- Successor function. Returns a number plus one.
- Converts a church numeral to a constant number. See
ConstNumber
.
Type Aliases§
- Church numeral for zero.