elm/exercises/pangram/Pangram.example.elm

18 lines
331 B
Elm
Raw Permalink Normal View History

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