Created
July 27, 2011 17:42
-
-
Save ppurang/1109952 to your computer and use it in GitHub Desktop.
palindrome
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
//performance is not everything | |
//can this be parallel? | |
def isPalindrome(list: List[Int]) = { | |
(list zip list.reverse filter (a => a._1 != a._2) size) == 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment