Fair enough

Michał.

On 14 Jul 2017, 10:06 +0200, José Valim <[email protected]>, 
wrote:
> Stream.transform is already optimized for cases where you emit one or zero 
> element, so it is definitely the way to go. And we don't have any _reduce 
> function in Stream exactly because you can't get the accumulator.
>
>
>
> José Valim
> www.plataformatec.com.br
> Skype: jv.ptec
> Founder and Director of R&D
>
> > On Fri, Jul 14, 2017 at 9:52 AM, Michał Muskała <[email protected]> wrote:
> > > I was looking recently into transforming a stream in a one-to-one way 
> > > that requires maintaining an additional accumulator during the 
> > > transition. That's an obvious use case for map_reduce with Enum, but with 
> > > Stream we lack such a function. We have transform/3 that is somewhat 
> > > equivalent to Enum.flat_map_reduce, that we could use here, but I think 
> > > I'd prefer something simpler. I'm not 100% sure about the name, though.
> > >
> > > Michał.
> > > --
> > > You received this message because you are subscribed to the Google Groups 
> > > "elixir-lang-core" group.
> > > To unsubscribe from this group and stop receiving emails from it, send an 
> > > email to [email protected].
> > > To view this discussion on the web visit 
> > > https://groups.google.com/d/msgid/elixir-lang-core/2e5eb853-9fd8-4410-a82c-18da0297d4b5%40Spark.
> > > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "elixir-lang-core" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4JWK9JRNarJuo4ZPpB05-n%2B6s5U3k0SHt5rxWbEzbLGKQ%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/95ecc0b7-eaca-4069-b390-800691644ea3%40Spark.
For more options, visit https://groups.google.com/d/optout.

Reply via email to