When to use concatMap operator

So, when to use concatMap?

The following list contains the contexts and situations where concatMap will fit best:

  • When you are downloading the list of data to display to the user. The order really matters here, you will surely not want to load and display the second item of the list after the third and fourth one are already displayed, would you?
  • Performing some operation on a sorted list, making sure the list stays the same.

Get Reactive Programming in Kotlin now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.