containers v0.6.2 Containers.Classy.List View Source

Provide total function support to the List function in the standard Elixir library.

Link to this section Summary

Functions

Safetly wraps the Elixir.List.first function to return if an Optional to protect against runtime failure

Link to this section Functions

Safetly wraps the Elixir.List.first function to return if an Optional to protect against runtime failure.

Examples

iex> Containers.Classy.List.first []
%Containers.Optional{value: nil}
iex> Containers.Classy.List.first [1]
%Containers.Optional{value: 1}