List Comprehension In Swift

Let's explore ways to add list comprehension to Swift.

Motivation

List comprehension should be no stranger to a Python or (and?) Haskell user. It's a really compact syntax that deals with Cartesian product of lists. In the case of Python, it's probably responsible for the lack of evolution of lambda expressions, since it's much nicer to write one-liners with it in place of map s and filter s.

Here's an example of an list comprehension in Haskell from Wikipedia: