Hi all, How can returnList be generated in a funct...
# announcements
l
Hi all, How can returnList be generated in a functional way?
g
You can do this using filter for section and flatMap. But your imperative implementation has better performance than possible functional ones
l
Thanks Andrey, what would flatMap part look like?
g
You also can omit .toList(), depends on case, but because your mutable list is not cached, you can return it without protective copy
👍 1