Search code examples
scalafs2

How to convert Stream of chunks to regular Stream in Fs2


For example:

chunked = Stream(1, 2, 3).chunks val regular = ???

Thank you.


Solution

  • Ok, I've found it here:

    val regular = chunked.flatMap(c => Stream.chunk(c))