diff options
author | Joris Guyonvarch | 2015-03-21 15:57:37 +0100 |
---|---|---|
committer | Joris Guyonvarch | 2015-03-21 15:57:37 +0100 |
commit | d57ea4eda1339ae55f1f1f6341d1af6b1a690330 (patch) | |
tree | 668fae3e2f10c6915eeb90309f789a63a900b04e /src/Utils | |
parent | c73c712a56213b327b9d53262b81c80a3e23dcae (diff) |
Can remove numbers in timer edition
Diffstat (limited to 'src/Utils')
-rw-r--r-- | src/Utils/List.elm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Utils/List.elm b/src/Utils/List.elm index 6895d83..64ebaa5 100644 --- a/src/Utils/List.elm +++ b/src/Utils/List.elm @@ -1,6 +1,7 @@ module Utils.List ( repeat , splitAt + , maybeTail ) where import List @@ -15,3 +16,9 @@ repeat count elem = splitAt : Int -> List a -> (List a, List a) splitAt n xs = (List.take n xs, List.drop n xs) + +maybeTail : List a -> Maybe (List a) +maybeTail xs = + case xs of + _ :: tl -> Just tl + _ -> Nothing |