Stdlib.Data.Maybe.Base
Contents
type Maybe ASource#
Represents an optional value that may or may not be present. Provides a way to handle null or missing values in a type-safe manner.
Constructors
fromMaybe {A} (a : A) : Maybe A → ASource#
Extracts the value from a Maybe if present, else returns the given value.
maybe {A B} (b : B) (f : A → B) : Maybe A → BSource#
Applies a function to the value from a Maybe if present, else returns the given value.