p_enum v0.1.0 PEnum

Parallel Enum. This library provides a set of functions similar to the ones in the Enum module except that the function is executed on each element parallel.

The behavior of each of the functions should be the same as the Enum varieties, except that order of execution is not guaranteed.

Except where otherwise noted, the function names are identical to the ones in Enum but with a p in front. For example, PEnum.pmap is a parallel version of Enum.map.

Link to this section Summary

Link to this section Types

Link to this type element()
element() :: any()

Link to this section Functions

Link to this function group_byp(enumerable, key_fun, value_fun \\ fn x -> x end)
group_byp(Enumerable.t(), (element() -> any()), (element() -> any())) ::
  map()
Link to this function pchunk_by(enumerable, fun)
pchunk_by(Enumerable.t(), (element() -> any())) :: [list()]
Link to this function pcount(enumerable, fun)
pcount(Enumerable.t(), (element() -> as_boolean(term()))) :: non_neg_integer()
Link to this function pdedup_by(enumerable, fun)
pdedup_by(Enumerable.t(), (element() -> term())) :: list()
Link to this function peach(enumerable, fun)
peach(Enumerable.t(), (element() -> any())) :: :ok
Link to this function pfilter(enumerable, fun)
pfilter(Enumerable.t(), (element() -> as_boolean(term()))) :: list()
Link to this function pflat_map(enumerable, fun)
pflat_map(Enumerable.t(), (element() -> Enumerable.t())) :: list()
Link to this function pgroup_by(enumerable, key_fun, value_fun \\ fn x -> x end)
pgroup_by(Enumerable.t(), (element() -> any()), (element() -> any())) ::
  map()
Link to this function pgroup_byp(enumerable, key_fun, value_fun \\ fn x -> x end)
pgroup_byp(Enumerable.t(), (element() -> any()), (element() -> any())) ::
  map()
Link to this function pinto(enumerable, collectable, transform)
pinto(Enumerable.t(), Collectable.t(), (term() -> term())) :: Collectable.t()
Link to this function pmap(enumerable, fun)
pmap(Enumerable.t(), (element() -> any())) :: list()
Link to this function pmap_every(enumerable, nth, fun)
pmap_every(Enumerable.t(), non_neg_integer(), (element() -> any())) :: list()
Link to this function pmap_join(enumerable, joiner \\ "", mapper)
pmap_join(Enumerable.t(), String.t(), (element() -> String.Chars.t())) ::
  String.t()
Link to this function pmax_by(enumerable, fun, empty_fallback \\ fn -> raise(Enum.EmptyError) end)
pmax_by(Enumerable.t(), (element() -> any()), (() -> empty_result)) ::
  element() | empty_result | no_return()
when empty_result: any()
Link to this function pmin_by(enumerable, fun, empty_fallback \\ fn -> raise(Enum.EmptyError) end)
pmin_by(Enumerable.t(), (element() -> any()), (() -> empty_result)) ::
  element() | empty_result | no_return()
when empty_result: any()
Link to this function pmin_max_by(enumerable, fun, empty_fallback \\ fn -> raise(Enum.EmptyError) end)
pmin_max_by(Enumerable.t(), (element() -> any()), (() -> empty_result)) ::
  {element(), element()} | empty_result | no_return()
when empty_result: any()
Link to this function preject(enumerable, fun)
preject(Enumerable.t(), (element() -> as_boolean(term()))) :: list()
Link to this function puniq_by(enumerable, fun)
puniq_by(Enumerable.t(), (element() -> term())) :: list()