utility-ht-0.0.2: Various small helper functions for Lists, Maybes, Tuples, Functions

Data.Tuple.HT

Contents

Synopsis

Pair

mapPair :: (a -> c, b -> d) -> (a, b) -> (c, d)Source

'(Control.Arrow.***)'

mapFst :: (a -> c) -> (a, b) -> (c, b)Source

Control.Arrow.first

mapSnd :: (b -> c) -> (a, b) -> (a, c)Source

Control.Arrow.second

swap :: (a, b) -> (b, a)Source

forcePair :: (a, b) -> (a, b)Source

Triple

fst3 :: (a, b, c) -> aSource

snd3 :: (a, b, c) -> bSource

thd3 :: (a, b, c) -> cSource

curry3 :: ((a, b, c) -> d) -> a -> b -> c -> dSource

uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> dSource