These are transformation operators for collections and flows.
[1, 2, 3].map { it * 2 } -> [2, 4, 6]val users = listOf(User("A", listOf("Order1")), User("B", listOf("Order2")))
// map returns List<List<String>>
users.map { it.orders } -> [[Order1], [Order2]]
// flatMap returns List<String>
users.flatMap { it.orders } -> [Order1, Order2]
Mark this when you can explain the answer in your own words.
Help fellow developers prepare for interviews
Sharing helps the Android community grow ๐