An optional value.
More...
Go to the source code of this file.
◆ ML99_IS_JUST
| #define ML99_IS_JUST |
( |
| maybe | ) |
|
◆ ML99_IS_NOTHING
| #define ML99_IS_NOTHING |
( |
| maybe | ) |
|
Value:ML99_NOT(ML99_IS_JUST(maybe))
◆ ML99_isJust
| #define ML99_isJust |
( |
| maybe | ) |
|
Value:
#define ML99_call(op,...)
Invokes a metafunction with arguments.
Definition lang.h:33
#define ML99_isJust(maybe)
ML99_true() if maybe contains some value, otherwise ML99_false().
Definition maybe.h:40
ML99_true() if maybe contains some value, otherwise ML99_false().
Examples
#define v(...)
A value that is pasted as-is; no evaluation occurs on provided arguments.
Definition lang.h:145
#define ML99_nothing(...)
No value.
Definition maybe.h:23
#define ML99_just(x)
Some value x.
Definition maybe.h:18
◆ ML99_isNothing
| #define ML99_isNothing |
( |
| maybe | ) |
|
Value:
#define ML99_isNothing(maybe)
The inverse of ML99_isJust.
Definition maybe.h:57
The inverse of ML99_isJust.
Examples
◆ ML99_JUST
◆ ML99_just
◆ ML99_maybeEq
| #define ML99_maybeEq |
( |
| cmp, |
|
|
| maybe, |
|
|
| other ) |
Value:
#define ML99_maybeEq(cmp, maybe, other)
Tests maybe and other for equality.
Definition maybe.h:78
Tests maybe and other for equality.
Examples
Natural numbers: [0; 255].
#define ML99_natEq(x, y)
Definition nat.h:112
◆ ML99_maybeUnwrap
| #define ML99_maybeUnwrap |
( |
| maybe | ) |
|
Value:
#define ML99_maybeUnwrap(maybe)
Returns the contained value on ML99_just(x) or emits a fatal error on ML99_nothing().
Definition maybe.h:95
Returns the contained value on ML99_just(x) or emits a fatal error on ML99_nothing().
Examples
◆ ML99_NOTHING
| #define ML99_NOTHING |
( |
| ... | ) |
|
◆ ML99_nothing
| #define ML99_nothing |
( |
| ... | ) |
|
Value:
#define ML99_callUneval(ident,...)
Invokes a metafunction ident with unevaluated arguments.
Definition lang.h:42
No value.