mirror of
https://github.com/correl/elm.git
synced 2024-12-18 11:06:17 +00:00
17 lines
331 B
Elm
17 lines
331 B
Elm
module Pangram exposing (..)
|
|
|
|
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"
|