Created
December 22, 2015 16:50
-
-
Save Boerworz/dd71f00ba7fedcff240d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func boxed() -> [UnboxableDictionary] { | |
return flatMap { | |
guard let boxable = $0 as? Boxable else { | |
return nil | |
} | |
return boxable.boxed() | |
} | |
} | |
// or | |
func boxed() -> [UnboxableDictionary] { | |
return flatMap { ($0 as? Boxable)?.boxed() } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment