This post written on August 15, 2015 to be compatible with Xcode 6 and Swift 1.2 List comprehensions provide a concise way to create lists. You can accomplish list comprehension-like operations in Swift even though list comprehensions are not mentioned in the Swift language guide. Say you want to create a list of squares, like:…
Author: Veronica Ray
Veronica Ray is a software engineer at LinkedIn. She honed her functional programming chops in Scala and is excited about developing on iOS with Swift. Once she rode her bike between two moose. Follow her on Medium and Twitter: @nerdonica.