Sign up to request clarification or add additional context in comments.
Comments
1
As mentioned in @Lee's answer, flatten is the way to go; a little more complicated approach that is condensed by flatten is myList.flatMap(identity), namely myList.map(identity).flatten.