Created
July 25, 2016 18:08
-
-
Save dmathewwws/6d5bc1ad8f380f0c72b593808ed9d576 to your computer and use it in GitHub Desktop.
W5D1 - Swift Mini Assignment
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
Write a function that pluralizes words. | |
• By default, it just adds "s" to the end. | |
• But there are some exceptions ("goose" -> "geese") | |
• Create a dictionary of exceptions, so I can look up "hoof" and get back "hooves". | |
• The function should first check the dictionary, to see if it has an exception, then fall back to appending "s" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment