How to stop stream from ending

147 Views Asked by At

How to stop the take method from ending nested streams, to be used with flatten?

Is there some other solution to nested streams? I tried merging fromDiagram without end symbol, but apparently that doesn't work.

1

There are 1 best solutions below

0
On

I got told that xs.never() is method specifically for this use case, and while I still don't know why fromDiagram would fail, I suppose that is an answer enough.

xs.merge(stream.take(1), xs.never()).map(nestedStream)