box1_of_e1.flatMap(e1 -> box2_of_e2) -> box1_of_e2
- Maps every element of the source box to a target box.
- If the target box is not empty, unwraps it and puts its content into the source box.
- If the target box is empty, ignores it.
So it filters out empty target boxes.
But it doesn't filter out empty elements of the source box. The mapping function f
must handle empty source elements.