|
>The Haskell list comprehension made sense to me the first time I saw it, but there is no way I'd know what the mess in the article was doing until someone explained to me. Given that this is basic Swift, the complaint makes no sense: let a = Array(1..<5, 3..<5, where: { n, _ in n % 2 == 0 })
{ ($0, $1) }
// [(2,3),(2,4),(2,5) ...
let a = Array(1..<5, 3..<5) { ($0, $1) }
// [(1,3),(1,4),(1,5),(2,3),(2,4) ...
|