View Source Bindable.Maybe (Bindable v1.1.0)

Yet another Maybe implementation.

Maybe is a data type that is used to represent optional values that may or may not be present. It is typically used as a safer alternative to using null or undefined values.

Link to this section Summary

Link to this section Types

@type just(a) :: %Bindable.Maybe{value: %Bindable.Maybe.Just{value: a}}
@type nothing() :: %Bindable.Maybe{value: %Bindable.Maybe.Nothing{}}
@type t(a) :: nothing() | just(a)

Link to this section Functions

@spec just(a) :: just(a) when a: var
@spec nothing() :: nothing()
@spec of_nullable(nil | a) :: t(a) when a: var