diff options
Diffstat (limited to 'src/Utils')
-rw-r--r-- | src/Utils/List.elm | 18 | ||||
-rw-r--r-- | src/Utils/Maybe.elm | 4 |
2 files changed, 4 insertions, 18 deletions
diff --git a/src/Utils/List.elm b/src/Utils/List.elm index 83b11eb..7f2e928 100644 --- a/src/Utils/List.elm +++ b/src/Utils/List.elm @@ -1,9 +1,7 @@ -module Utils.List +module Utils.List exposing ( repeat , splitAt - , maybeHead - , maybeTail - ) where + ) import List @@ -17,15 +15,3 @@ repeat count elem = splitAt : Int -> List a -> (List a, List a) splitAt n xs = (List.take n xs, List.drop n xs) - -maybeHead : List a -> Maybe a -maybeHead xs = - case xs of - x :: _ -> Just x - _ -> Nothing - -maybeTail : List a -> Maybe (List a) -maybeTail xs = - case xs of - _ :: tl -> Just tl - _ -> Nothing diff --git a/src/Utils/Maybe.elm b/src/Utils/Maybe.elm index 355ded9..db25bff 100644 --- a/src/Utils/Maybe.elm +++ b/src/Utils/Maybe.elm @@ -1,7 +1,7 @@ -module Utils.Maybe +module Utils.Maybe exposing ( filterMaybe , orElse - ) where + ) filterMaybe : (a -> Bool) -> Maybe a -> Maybe a filterMaybe cond maybe = |