From 2613aeeae0f4de44842ff0e796603d0316a61a14 Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Wed, 18 Mar 2015 00:32:17 +0100 Subject: Can edit the time, unfortunately the enter key is overriden so the '+' key of the numpad is used instead --- src/Utils/List.elm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/Utils/List.elm (limited to 'src/Utils/List.elm') diff --git a/src/Utils/List.elm b/src/Utils/List.elm new file mode 100644 index 0000000..6895d83 --- /dev/null +++ b/src/Utils/List.elm @@ -0,0 +1,17 @@ +module Utils.List + ( repeat + , splitAt + ) where + +import List + +repeat : Int -> a -> List a +repeat count elem = + if count > 0 + then + elem :: (repeat (count - 1) elem) + else + [] + +splitAt : Int -> List a -> (List a, List a) +splitAt n xs = (List.take n xs, List.drop n xs) -- cgit v1.2.3