Created
September 28, 2017 16:28
-
-
Save jyaunches/ec8a9a3258002c0440580ed0e50939a0 to your computer and use it in GitHub Desktop.
Contains functionality requires ability to iterate
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
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