mayo v0.2.0 Mayo.List
Summary
Functions
Checks the number of elements in the list
Checks the maximum number of elements in the list
Checks the minimum number of elements in the list
Functions
Checks the number of elements in the list.
iex> Mayo.List.length([1, 2, 3], 3)
[1, 2, 3]
iex> Mayo.List.length([1], 3)
{:error, %Mayo.Error{type: "list.length"}}
Checks the maximum number of elements in the list.
iex> Mayo.List.max([1, 2, 3], 3)
[1, 2, 3]
iex> Mayo.List.max([1, 2, 3, 4], 3)
{:error, %Mayo.Error{type: "list.max"}}