I’ve got two flows:
bigThings:Flow<LargeObject> = ....
counts:Flow<Int> = (1..3).asFlow()
Is there a way to transform them into variable length “chunks”, where the chunk-size is determined by the counts? like a bigThings.combineBy(counts)
output: Flow<Flow<LargeObject>>
where the first entry from the flow is a flow of 1 object, the second is a flow of 2, and the third has 3.
It feels like it might be “wrong” - like the chunking step would have to vary as it goes, which might (?) violate the flow philosophy?