Created
May 20, 2019 07:56
-
-
Save saru2020/b00723d72c7773a9f5f05d5902c0b41a 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
| //Imperative Programming | |
| func filterContacts(aboveAge age: Int) -> [Contact] { | |
| var filteredContacts = [Contact]() | |
| for contact in contacts { | |
| if contact.age > age { | |
| filteredContacts.append(contact) | |
| } | |
| } | |
| return filteredContacts | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment