is there anything like rx’s .buffer() for kotlin’s sequence / iterable?
g
gildor
12/17/2018, 11:34 PM
But sequence and iterable are completely syncronous, they are pull based, not push based as rx
How do you expect this should work?
You can use take(N) to get required amount of items, it's closest what I can imagine to buffer (but pretty different)
g
gsala
12/18/2018, 8:32 AM
You can use
.chunked(n)
if what you want is to group into lists of
n
items
👍 1
c
Clive
12/18/2018, 3:39 PM
^ exactly what i was looking for. thanks!
Clive
12/18/2018, 3:39 PM
^ and the terminology makes sense too since it’s synchronous