map/2 |
Returns a list where each element is the result of invoking Fun on each
corresponding element of Enumerable . |
pmap/2 | Equivalent to pmap(Fun, infinity, Enumerable). |
pmap/3 |
Similar to shards_enum:map/2 but it runs in parallel. |
reduce/3 |
Invokes Fun for each element in the Enumerable with the
accumulator. |
reduce_while/3 |
Reduces enumerable until Fun returns {halt, AccOut} . |
map(Fun, Enumerable) -> [Result]
Returns a list where each element is the result of invoking Fun
on each
corresponding element of Enumerable
.
pmap(Fun, Enumerable) -> any()
Equivalent to pmap(Fun, infinity, Enumerable).
pmap(Fun, Timeout, Enumerable) -> [Result]
Similar to shards_enum:map/2
but it runs in parallel.
reduce(Fun, Acc0, Enumerable) -> Acc1
Invokes Fun
for each element in the Enumerable
with the
accumulator.
Acc0
. The function is
invoked for each element in the enumerable with the accumulator.
The result returned by the function is used as the accumulator
for the next iteration. The function returns the last accumulator.
reduce_while(Fun, Acc0, Enumerable) -> Acc1
Reduces enumerable until Fun
returns {halt, AccOut}
.
The return value for Fun
is expected to be
{cont, AccOut}
to continue the reduction with AccOut
as the new accumulator or
{halt, AccOut}
to halt the reduction
{halt, AccOut}
the reduction is halted and the function
returns AccOut
. Otherwise, if the enumerable is exhausted, the function
returns the accumulator of the last {cont, AccOut}
.
Generated by EDoc