Re: [elixir-core:8384] Enum.sum/2

2018-12-02 Thread Sean Handley
he module, thereby increasing the API surface. > > As for the second one, this code does one pass through the list: > > Stream.map([1,2,3], & &1*2) |> Enum.sum > > On Sat, Dec 1, 2018 at 6:19 PM Sean Handley > wrote: > >> Hello, >> >> I'd like to pro

Re: [elixir-core:8381] Enum.sum/2

2018-12-01 Thread Sean Handley
. > > Anyhow, is `Enum.sum/2` that much more expressive than `Enum.reduce/3`? > > Enum.reduce([1, 2, 3], 0, &(&1 * 2 + &2)) > > — Parker > > On Sat, Dec 1, 2018, at 10:18 AM, Sean Handley wrote: > > Hello, > > I'd like to propose *Enum.sum/2*, where th