mirror of
https://github.com/correl/elm.git
synced 2024-11-16 19:19:28 +00:00
18 lines
308 B
Text
18 lines
308 B
Text
|
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"
|