Option type represents optional values. An Option<A> can either be Some<A> (containing a value) or None (representing absence of a value).
Type Definition
Constructors
none
Creates anOption representing the absence of a value.
some
Creates anOption containing a value.
fromNullable
Converts a nullable value to anOption.
Operations
map
Transforms the value inside anOption.
flatMap
Sequences computations that returnOption values.
getOrElse
Extracts the value from anOption or returns a default.
match
Pattern matches on anOption.