From 1e47a7754ca38bd1a6c74765d8378caf68ce4619 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 26 Mar 2017 21:10:42 +0200 Subject: Separate client and server watch --- src/client/Utils/Dict.elm | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/client/Utils/Dict.elm (limited to 'src/client/Utils/Dict.elm') diff --git a/src/client/Utils/Dict.elm b/src/client/Utils/Dict.elm new file mode 100644 index 0000000..7d708e2 --- /dev/null +++ b/src/client/Utils/Dict.elm @@ -0,0 +1,11 @@ +module Utils.Dict exposing + ( mapValues + ) + +import Dict as Dict exposing (..) + +mapValues : (a -> b) -> Dict comparable a -> Dict comparable b +mapValues f = Dict.fromList << List.map (onSecond f) << Dict.toList + +onSecond : (a -> b) -> (comparable, a) -> (comparable, b) +onSecond f tuple = case tuple of (x, y) -> (x, f y) -- cgit v1.2.3