Comment
Comment by jclem
You can reduce with list comprehensions in Elixir, but it's uncommon to see:
Other comments are correct that `Enum.reduce/2` is probably better:
Obviously you don't have the flexibility / mutability you refer to in other comments with either of these, but you can always put more in your accumulator:
(A contrived function that returns a list sum and an updated map with the count of the values found in the list)