Optional values, which are either some
around a value from the underlying type or none
.
Option
can represent nullable types or computations that might fail. In the codomain of a function
type, it can also represent partiality.
Constructors
none.{u} {α : Type u} : Option α
No value.
some.{u} {α : Type u} (val : α) : Option α
Some value of type α
.