ex_maybe v1.0.0 ExMaybe
This library fills a bunch of important niches. A Maybe can help you with optional arguments, error handling, and records with optional fields.
Link to this section Summary
Functions
Transform a Maybe value with a given function
Provide a default value, turning an optional value into a normal value
Link to this section Types
Link to this section Functions
Transform a Maybe value with a given function.
Examples
iex> ExMaybe.map(nil, fn(_) -> "TEST" end)
nil
iex> ExMaybe.map(10, fn(val) -> val + 1 end)
11