are you concerned about the performance impact of chaining the flatMaps? Personally I wouldn’t worry about it, because it’s usually not going to be that bad.
If you wanted to avoid problems with chained flatMaps it you could use a Sequence. This can help with performance, but it can also hinder it
There’s also