View Source AbsintheQueryAll.Utils.Maybe (absinthe_query_all v0.5.0)

A "maybe" is a value that can be either some value or nil. Essentially this:

any() | nil

The concept is borrowed from Elm: https://package.elm-lang.org/packages/elm/core/latest/Maybe

This module is for chaining or otherwise manipulating maybe values.

Summary

Functions

Link to this function

map(maybe, success_function)

View Source
@spec map(any() | nil, (any() -> any())) :: any() | nil
Link to this function

with_default(maybe, default_value)

View Source
@spec with_default(any() | nil, any()) :: any() | nil