|
|
|
|
|
by overcyn
3170 days ago
|
|
This is my personal gripe with Swift. Theres just so many different ways to form expressions and do control flow. It just feels like code golf to me. for case let (title?, kind) in mediaList.map({ ($0.title, $0.kind) }) where title.hasPrefix("Harry Potter") {
print(" - [\(kind)] \(title)")
}
http://alisoftware.github.io/swift/pattern-matching/2016/05/... |
|