Thanks!

Sent from my phone - will be brief

> On Jan 29, 2016, at 5:25 AM, Endre Varga <[email protected]> wrote:
> 
> 
> 
>> On Fri, Jan 29, 2016 at 1:21 PM, Martynas Mickevičius 
>> <[email protected]> wrote:
>> Hi,
>> 
>> you can do that using scan with something like this (not compiled):
>> 
>> flow.scan(zero = (0, 0)) {
>>   case ((prevScan, prevElem), elem) => (prevScan, elem)
>> }
> 
> Almost, you missed the aggregator function:
> 
>    case ((prevScan, prevElem), elem) => (aggregator(prevScan, elem), elem)
> 
> -Endre
> 
>> 
>>> On Thu, Jan 28, 2016 at 6:05 PM, Richard Rodseth <[email protected]> wrote:
>>> In akka-streams, scan is like fold, in that it takes a zero and a function 
>>> to do the accumulating, but it emits each accumulated value rather than the 
>>> final result.
>>> 
>>> But what if I wanted to emit tuples of the accumulated value and the stream 
>>> element?
>>> 
>>> Is there an operator I've missed or would scanMap (?) be a useful addition?
>>> 
>>> 
>>> -- 
>>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>>> >>>>>>>>>> Check the FAQ: 
>>> >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
>>> --- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "Akka User List" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at https://groups.google.com/group/akka-user.
>>> For more options, visit https://groups.google.com/d/optout.
>> 
>> 
>> 
>> -- 
>> Martynas Mickevičius
>> Typesafe – Reactive Apps on the JVM
>> -- 
>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>> >>>>>>>>>> Check the FAQ: 
>> >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Akka User List" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at https://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ: 
> >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to