Skip to content

Instantly share code, notes, and snippets.

@qwzybug
Created February 10, 2015 20:44
Show Gist options
  • Save qwzybug/3038d0a880b2fe3b902d to your computer and use it in GitHub Desktop.
Save qwzybug/3038d0a880b2fe3b902d to your computer and use it in GitHub Desktop.
countdown to haskell-style commas in 3... 2... 1...
for userDict in userList {
if let
id = userDict["id"] as? Int
, name = userDict["name"] as? String
, email = userDict["email"] as? String
, address = userDict["address"] as? [String: AnyObject]
{
users.append(User(id: id, name: name, ...))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment