elm/exercises/pangram/Pangram.example

18 lines
308 B
Text
Raw Normal View History

2016-03-14 00:15:06 +00:00
module Pangram (..) where
import String exposing (toLower, contains, fromChar)
isPangram : String -> Bool
isPangram sentence =
let
normalized =
toLower sentence
in
String.all (\c -> contains (fromChar c) normalized) alphabet
alphabet : String
alphabet =
"abcdefghijklmnopqrstuvwxyz"