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)