Last active
March 12, 2017 01:08
-
-
Save efremidze/14a3bed5ef2993d2b45db8b5b7ca19c4 to your computer and use it in GitHub Desktop.
2d array extension
This file contains hidden or 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
extension Array where Element: _ArrayType, Element.Generator.Element: AnyObject? { | |
func flatten() { | |
return flatMap { $0.flatMap { $0 } } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment