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.