Skip to content

Instantly share code, notes, and snippets.

@wfarr
Created February 26, 2009 06:30
Show Gist options
  • Select an option

  • Save wfarr/70697 to your computer and use it in GitHub Desktop.

Select an option

Save wfarr/70697 to your computer and use it in GitHub Desktop.
module Main
where
import Char
isPal :: (Monad m) => [Char] -> m Bool
isPal str =
let _str = (map Char.toLower str) in
if length _str == 1 then
return True
else
if head _str == last _str then
isPal ((init . tail) _str)
else
return False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment