Created
March 30, 2015 09:09
-
-
Save joanmolinas/d689265ae58b01c0aace 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
let word = "detartrated" | |
func palindromeWord(word : String) ->Bool { | |
return String(reverse(word)) == word ? true : false | |
} | |
palindromeWord(word) // OUTPUT -> True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment