Introduction
FlatMap helps you turn a list of lists into a single list. It makes nested collections easier to work with by flattening them.
You have an array of arrays and want one simple array with all items.
You want to remove empty or nil values while flattening nested collections.
You want to combine multiple lists into one without extra loops.