mirror of
https://github.com/correl/elm.git
synced 2024-11-21 11:08:39 +00:00
Merge pull request #165 from anuragsoni/isograms
use isAlpha definition from the upcoming elm-lang core
This commit is contained in:
commit
3f35e2ac0b
1 changed files with 4 additions and 4 deletions
|
@ -5,16 +5,16 @@ import List
|
|||
import Char
|
||||
|
||||
|
||||
isLetter : Char -> Bool
|
||||
isLetter c =
|
||||
Char.isHexDigit c && (not <| Char.isDigit c)
|
||||
isAlpha : Char -> Bool
|
||||
isAlpha char =
|
||||
Char.isUpper char || Char.isLower char
|
||||
|
||||
|
||||
isIsogram : String -> Bool
|
||||
isIsogram sentence =
|
||||
let
|
||||
sanitized =
|
||||
String.filter isLetter sentence
|
||||
String.filter isAlpha sentence
|
||||
|> String.toLower
|
||||
|> String.toList
|
||||
|> List.sort
|
||||
|
|
Loading…
Reference in a new issue