Skip to content

Instantly share code, notes, and snippets.

@jyaunches
Created September 28, 2017 16:28
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 jyaunches/ec8a9a3258002c0440580ed0e50939a0 to your computer and use it in GitHub Desktop.
Save jyaunches/ec8a9a3258002c0440580ed0e50939a0 to your computer and use it in GitHub Desktop.
Contains functionality requires ability to iterate
func contains(e: Element) -> Bool {
var elementFound = false
for item in elements {
if e == item {
elementFound = true
}
}
return elementFound
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment