Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmathewwws/6d5bc1ad8f380f0c72b593808ed9d576 to your computer and use it in GitHub Desktop.
Save dmathewwws/6d5bc1ad8f380f0c72b593808ed9d576 to your computer and use it in GitHub Desktop.
W5D1 - Swift Mini Assignment
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