Skip to content

Instantly share code, notes, and snippets.

@ppurang
Created July 27, 2011 17:42
Show Gist options
  • Save ppurang/1109952 to your computer and use it in GitHub Desktop.
Save ppurang/1109952 to your computer and use it in GitHub Desktop.
palindrome
//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