summaryrefslogtreecommitdiff |
diff options
Diffstat (limited to 'elm/battlemap/src/Util')
-rw-r--r-- | elm/battlemap/src/Util/Array.elm | 25 | ||||
-rw-r--r-- | elm/battlemap/src/Util/List.elm | 12 |
2 files changed, 0 insertions, 37 deletions
diff --git a/elm/battlemap/src/Util/Array.elm b/elm/battlemap/src/Util/Array.elm deleted file mode 100644 index 69d329c..0000000 --- a/elm/battlemap/src/Util/Array.elm +++ /dev/null @@ -1,25 +0,0 @@ -module Util.Array exposing (update, update_unsafe) - -import Array - -update : ( - Int -> - ((Maybe t) -> (Maybe t)) -> - (Array.Array t) -> - (Array.Array t) - ) -update index fun array = - case (fun (Array.get index array)) of - Nothing -> array - (Just e) -> (Array.set index e array) - -update_unsafe : ( - Int -> - (t -> t) -> - (Array.Array t) -> - (Array.Array t) - ) -update_unsafe index fun array = - case (Array.get index array) of - Nothing -> array - (Just e) -> (Array.set index (fun e) array) diff --git a/elm/battlemap/src/Util/List.elm b/elm/battlemap/src/Util/List.elm deleted file mode 100644 index c4db397..0000000 --- a/elm/battlemap/src/Util/List.elm +++ /dev/null @@ -1,12 +0,0 @@ -module Util.List exposing (pop) - -import List - -pop : List a -> (Maybe (a, List a)) -pop l = - case - ((List.head l), (List.tail l)) - of - (Nothing, _) -> Nothing - (_ , Nothing) -> Nothing - ((Just head), (Just tail)) -> (Just (head, tail)) |