|
| #define | ML99_inc(x) |
| | \(x + 1\)
|
| #define | ML99_dec(x) |
| | \(x - 1\)
|
| #define | ML99_natMatch(x, matcher) |
| | Matches x against the two cases: if it is zero or positive.
|
| #define | ML99_natMatchWithArgs(x, matcher, ...) |
| | The same as ML99_natMatch but provides additional arguments to all branches.
|
| #define | ML99_natEq(x, y) |
| | \(x = y\)
|
| #define | ML99_natNeq(x, y) |
| | \(x \neq y\)
|
| #define | ML99_greater(x, y) |
| | \(x > y\)
|
| #define | ML99_greaterEq(x, y) |
| | \(x \geq y\)
|
| #define | ML99_lesser(x, y) |
| | \(x < y\)
|
| #define | ML99_lesserEq(x, y) |
| | \(x \leq y\)
|
| #define | ML99_add(x, y) |
| | \(x + y\)
|
| #define | ML99_sub(x, y) |
| | \(x - y\)
|
| #define | ML99_mul(x, y) |
| | \(x * y\)
|
| #define | ML99_div(x, y) |
| | \(\frac{x}{y}\)
|
| #define | ML99_divChecked(x, y) |
| | Like ML99_div but returns ML99_nothing() is x is not divisible by y, otherwise ML99_just(result).
|
| #define | ML99_mod(x, y) |
| | Computes the remainder of division.
|
| #define | ML99_add3(x, y, z) |
| | \(x + y + z\)
|
| #define | ML99_sub3(x, y, z) |
| | \(x - y - z\)
|
| #define | ML99_mul3(x, y, z) |
| | \(x * y * z\)
|
| #define | ML99_div3(x, y, z) |
| | \(\frac{(\frac{x}{y})}{z}\)
|
| #define | ML99_min(x, y) |
| | \(min(x, y)\)
|
| #define | ML99_max(x, y) |
| | \(max(x, y)\)
|
| #define | ML99_assertIsNat(x) |
| | Emits a fatal error if x is not a natural number, otherwise results in emptiness.
|
| #define | ML99_INC(x) |
| #define | ML99_DEC(x) |
| #define | ML99_NAT_EQ(x, y) |
| #define | ML99_NAT_NEQ(x, y) |
| #define | ML99_DIV_CHECKED(x, y) |
|
#define | ML99_NAT_MAX 255 |
| | The maximum value of a natural number, currently 255.
|
Natural numbers: [0; 255].
Most of the time, natural numbers are used for iteration; they are not meant for CPU-bound tasks such as Fibonacci numbers or factorials.