MAYBE

template <typename T> pure Maybe<T> maybe();
template <typename T> pure Maybe<T> maybe(const T &x);
template <typename T> pure bool empty(Maybe<T> m);

template <typename T>
pure Maybe<T> maybe()

Construct nothing. O(1).


template <typename T>
pure Maybe<T> maybe(const T &x)

Construct a maybe with an element. O(1).


template <typename T>
pure bool empty(Maybe<T> m)

Test if the maybe object is empty. O(1).