ExDash v0.2.0 Exdash.Collection
Summary
Functions
Check if fun
returns thruthy for all elements of collection
. Iteration is stopped once the invocation of fun
returns a falsy value
Filters the enumerable, i.e. returns only those elements for which fun
returns a truthy value
Returns the first value of which invoking fun
equals true. Otherwise return default
Same as Exdash.Collection.find but searches through the collection
from right to left
Returns a list
where each item is the result of invoking fun
on each element in the collection
Same as Exdash.Collection.every but executed in parallel
Same as Exdash.Collection.filter but executed in parallel
Same as Exdash.Collection.find but executed in parallel
Same as Exdash.Collection.find_last but executed in parallel
Same as Exdash.Collection.map but executed in parallel
Functions
Check if fun
returns thruthy for all elements of collection
. Iteration is stopped once the invocation of fun
returns a falsy value.
Examples
iex> Exdash.Collection.every([1, 2, 3], &(&1 > 0))
true
iex> Exdash.Collection.every([-1, 2, 3], &(&1 > 0))
false
Filters the enumerable, i.e. returns only those elements for which fun
returns a truthy value.
Examples
iex> Enum.filter([1, 2, 3], &(&1 > 1))
[2, 3]
Returns the first value of which invoking fun
equals true. Otherwise return default
.
Examples
iex> Exdash.Collection.find([1, 2, 3], &(&1 > 2))
3
Same as Exdash.Collection.find but searches through the collection
from right to left.
Returns a list
where each item is the result of invoking fun
on each element in the collection
.
Examples
iex> Exdash.Collection.map([1, 2, 3], &(&1 + 1))
[2, 3, 4]