Skip to content

Instantly share code, notes, and snippets.

@freeman42x
Created April 26, 2016 23:46
Show Gist options
  • Save freeman42x/bc5b147e34d9802dbff050f1e4bcbf4a to your computer and use it in GitHub Desktop.
Save freeman42x/bc5b147e34d9802dbff050f1e4bcbf4a to your computer and use it in GitHub Desktop.
Pangram
import Data.Char
import Data.List
isPangram :: String -> Bool
isPangram s = (sort . nub . filter isLetter $ map toLower s) == ['a'..'z']
main :: IO ()
main = do
s <- getLine
putStrLn $ if isPangram s
then "pangram"
else "not pangram"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment