Created
April 26, 2016 23:46
-
-
Save freeman42x/bc5b147e34d9802dbff050f1e4bcbf4a to your computer and use it in GitHub Desktop.
Pangram
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
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