Skip to content

Instantly share code, notes, and snippets.

@shoooe
Created November 4, 2014 18:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shoooe/3e9bc661cba4d6b15f67 to your computer and use it in GitHub Desktop.
Save shoooe/3e9bc661cba4d6b15f67 to your computer and use it in GitHub Desktop.
import Data.Char (toLower)
isPangram :: String -> Bool
isPangram s =
let ls = map (toLower) s
in null . filter (not . (`elem` ls)) $ ['a'..'z']
main :: IO ()
main = do
s <- getLine
if isPangram s
then putStrLn "pangram"
else putStrLn "not pangram"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment