3.14 Maybe
Maybe is an "option type", similar to that found in languages like Scala, Haskell, and Rust. It allows for safe return from a function that might not return a result, without relying on Null. A Maybe can be either a Some containing a value, or the empty thing None. Maybe is implemented as a heirarchy of things, and the usual thing functions and behaviors apply to them, but a number of helper functions have also been provided for easier use with them.
The parent object of the Maybe family.
The thing for a Maybe containing a value. Child of Maybe.
The empty value, for a Maybe that contains no value.
Returns v wrapped in Some.
The bind operator for Maybe. Returns None if opt is None,
or if it is Some, returns the result of fn applied to the value field of
Some.
Returns the result of fn applied to the value contained in opt.
procedure
(maybe-filter pred? opt) → maybe?
pred? : fn? opt : maybe?
procedure
(maybe-guard test) → maybe?
test : boolean?