Last active
July 16, 2020 12:33
-
-
Save TarasShu/35c98651621bb7f5b20500572e0cbc00 to your computer and use it in GitHub Desktop.
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
func filterStateNames(_ arr: [String], _ type: String) -> [String] { | |
if type != "abb" { | |
return arr.filter({$0.count > 2}) | |
} | |
if type != "full" { | |
return arr.filter({$0.count < 2}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment