It’s basically my current understanding of how reduce in Elixir works. I’m aware that there are many gaps in my knowledge but I’d love to hear what you think, especially strong critical feedback of how to make this post better.
What I think I’m missing:
How Elixir’s reduce method compares to those in other languages
Why reduce is important? In other words, what are the alternative ways to solve for the problem reduce addresses if not in this way.
Core CS concepts I’m unaware of.
What are your thoughts on that list or what else do you think I should address to really get at the core of what this function is doing?
Enum.reduce/2 will use the head of the input as initial accumulator, while reducing over the tail. The head is not included in the reduction, but in your post you suggest it were.