Erlang Solutions: Reduce, Reuse… Refactor: Clearer Elixir with the Enum Module
“When an operation cannot be expressed by any of the functions in the Enum module, developers will most likely resort to reduce/3.”
From the docs for Enum.reduce/3
In many Elixir applications, I find
Enum.reduce
is used frequently.Enum.reduce
can do anything, but that doesn’t mean it should. In many cases, otherEnum
functions are more readable, practically as fast, and easier … ⌘ Read more