aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/Utils/Tuple.elm
blob: f9391a002e65bf10cabc8e4f506a7fbf724853cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
module Utils.Tuple exposing
  ( mapFst
  , mapSnd
  , mapBoth
  )

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)