Optional
Functions: operator==, print
enum Optional<T>
A value that may be absent.
None
NoneSome
Some(T value),operator==
bool operator== <T: Comparable>(Optional<T>& a, Optional<T>& b)Returns true if both optionals are equal.
bool operator== <T: Comparable>(Optional<T>& a, T& b)Returns true if the optional holds a value equal to b.
bool operator== <T: Comparable>(T& a, Optional<T>& b)Returns true if the optional holds a value equal to a.
bool operator== <T: Comparable>(Optional<T*>& a, T& b)Returns true if the optional pointer is non-null and points to a value equal to b.
bool operator== <T: Comparable>(T& a, Optional<T*>& b)Returns true if the optional pointer is non-null and points to a value equal to a.
void print<T: Printable>(Optional<T>& optional)Prints the given value.