binder v0.1.0 Binder.Maybe

Handles nil, so the functions don’t have to

This module fills out the required interface, but many of the functions are somewhat irrelevant because there is no wrapping datatype (a la Maybe in Haskell)

Link to this section Summary

Functions

Exactly like map. Technically has a different signature:

-> (x -> ) -> But because Elixir does not have algebraic datatypes that values, the behavior is exactly the same

Simply the identity

true if value is not nil

-> (x -> y) -> The function (x -> y) may assume x is always present

Simply nil

true if value is nil

Link to this section Functions

Exactly like map. Technically has a different signature:

-> (x -> ) -> But because Elixir does not have algebraic datatypes that values, the behavior is exactly the same

Simply the identity

true if value is not nil

-> (x -> y) -> The function (x -> y) may assume x is always present

Simply nil

true if value is nil