title: Swift 4 - FlatMap does not flatten array
body: <p>I'm playing around with Swift and I'm having some trouble with <code>flatMap</code>. I've seen <a href="https://stackoverflow.com/questions/24465281/flatten-a-array-of-arrays-in-swift">this</a> StackOverflow question, which describes how to flatten an array of arrays using <code>flatMap</code>, but when I reproduce the same code in a playground, it does not flatten the array. I'd appreciate it if someone could provide some insight into what's going on here. </p>
  
  <p>Here's a screenshot of both the code and the result:<a href="https://i.stack.imgur.com/2YAgk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2YAgk.png" alt="enter image description here"></a></p>