Option module
Values in Gleam are not nullable, so the
gleam/option
standard library module defines Gleam's
Option
type, which can be used to represent a value that is either present or absent.
The option type is very similar to the result type, but it does not have an error value. Some languages have functions that return an option when there is no extra error detail to give, but Gleam always uses result. This makes all fallible functions consistent and removes any boilerplate that would be required when mixing functions that use each type.