diff options
Diffstat (limited to 'Alpha.hs')
-rw-r--r-- | Alpha.hs | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -42,6 +42,7 @@ module Alpha -- * String capitalize, + lowercase, -- * Data Validation require, @@ -119,6 +120,8 @@ capitalize :: String -> String capitalize [] = [] capitalize str = (Char.toUpper <| List.head str) : (Char.toLower </ List.tail str) +lowercase str = [Char.toLower c | c <- str] + require :: Text -> Maybe a -> a require _ (Just x) = x require s Nothing = panic <| s <> " not found" |