Bottle.List (Bottle v1.0.1) View Source
Provides custom guards for lists
Link to this section Summary
Functions
Guard that passes for an empty list
Guard that passes for a list of a specific length
Guard that passes for a non empty list
Link to this section Functions
Guard that passes for an empty list
Examples
iex> is_empty_list([])
true
iex> is_empty_list([:foo])
false
Guard that passes for a list of a specific length
Examples
iex> is_list_with_length([], 0)
true
iex> is_list_with_length([:foo], 1)
true
iex> is_list_with_length([:foo], 2)
false
Guard that passes for a non empty list
Examples
iex> is_non_empty_list([:foo])
true
iex> is_non_empty_list([])
false