joamoiwamepfuewaf
This commit is contained in:
parent
ffb5f12540
commit
b20b246a88
1 changed files with 1 additions and 1 deletions
2
4.hs
2
4.hs
|
@ -19,7 +19,7 @@ nDigits :: Int -> String -> Maybe String
|
||||||
nDigits n s = guard (length s == n && all isDigit s) $> s
|
nDigits n s = guard (length s == n && all isDigit s) $> s
|
||||||
|
|
||||||
hexColor :: String -> Maybe String
|
hexColor :: String -> Maybe String
|
||||||
hexColor s = guard (length s == 7 && s !! 0 == '#' && all (\c -> elem c "0123456789abcdef") (drop 1 s)) $> s
|
hexColor s = guard (length s == 7 && s !! 0 == '#' && all (flip elem "0123456789abcdef") (drop 1 s)) $> s
|
||||||
|
|
||||||
validEcl :: String -> Bool
|
validEcl :: String -> Bool
|
||||||
validEcl = flip elem ["amb", "blu", "brn", "gry", "grn", "hzl", "oth"]
|
validEcl = flip elem ["amb", "blu", "brn", "gry", "grn", "hzl", "oth"]
|
||||||
|
|
Loading…
Reference in a new issue