[Scalaz-stream] How to accumulate data from Process

55 views
Skip to first unread message

Ugo Bourdon

unread,
Dec 9, 2015, 9:32:44 AM12/9/15
to scalaz
Hi,

I have this kind of process
Process[Task, A]

And I need to buffer value to produce
Process[Task, List[A]]

with fixed size for List[A]

For example, I process lines in database, and I want to buffer each 500 elements to perform some action (for example index this value in other db like elasticsearch).

Have any idea how to do that ?

Thx for your response.

Jeffrey Shaw

unread,
Dec 9, 2015, 9:52:57 AM12/9/15
to sca...@googlegroups.com
Ugo,
Take a look at the chunk method.

Jeff

--
You received this message because you are subscribed to the Google Groups "scalaz" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scalaz+un...@googlegroups.com.
To post to this group, send email to sca...@googlegroups.com.
Visit this group at http://groups.google.com/group/scalaz.
For more options, visit https://groups.google.com/d/optout.

Ugo Bourdon

unread,
Dec 9, 2015, 10:19:45 AM12/9/15
to scalaz
Thx !

You save my day :D
Reply all
Reply to author
Forward
0 new messages