Is there a function like groupBy (from rxjs) in fs2?
I'd like to use it to covert stream of messages to stream of streams with messages from each chat depends on message's chatId.
Example in rxjs:
function chats(messages$: Observable<Message>): Observable<GroupedObservable<number, Message>> {
return messages$.pipe(groupBy((m) => m.chatId));
}
This isn't built into the library, but it's been implemented in various libraries. For example, here's a version of it from fs2-aws (under the MIT license)