Given a type
A that has a property
A.location, I have some streams that emit objects of type A such that
A.location is always in ascending order, but there may be some consecutive objects that have the same
location, and ordering between objects with the same location is undefined.
Given a stream that emits objects of type
Source[A, Mat1], how can I group consecutive objects with the same location, say
Given multiple streams of
Seq[Source[A, Mat1]], I want a new stream that emits collections, such that each collection contains all objects with the same location, but in such a way, that I can still find, which object came from which stream. So, it couldn’t just be
Set[A], because then I wouldn’t know which object came from which stream. I need, for example, something like
Source[Seq[Set[A]], Mat3], where the first element is the set of objects from the first stream and so on.