From 76f8b85eb9f796d6df861a04f702ef5f48630795 Mon Sep 17 00:00:00 2001 From: Joris Date: Tue, 29 Mar 2016 23:46:47 +0200 Subject: Move logged data to LoggedIn component --- src/client/elm/Utils/Tuple.elm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/client/elm/Utils/Tuple.elm (limited to 'src/client/elm/Utils/Tuple.elm') diff --git a/src/client/elm/Utils/Tuple.elm b/src/client/elm/Utils/Tuple.elm new file mode 100644 index 0000000..d9246f6 --- /dev/null +++ b/src/client/elm/Utils/Tuple.elm @@ -0,0 +1,14 @@ +module Utils.Tuple + ( mapFst + , mapSnd + , mapBoth + ) where + +mapFst : (a -> x) -> (a, b) -> (x, b) +mapFst f (a, b) = (f a, b) + +mapSnd : (b -> x) -> (a, b) -> (a, x) +mapSnd f (a, b) = (a, f b) + +mapBoth : (a -> x) -> (b -> y) -> (a, b) -> (x, y) +mapBoth f g (a, b) = (f a, g b) -- cgit v1.2.3