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

Safe Haskell | Safe
Language | Haskell98

Data.Tuple.Strict

Contents

- Pair
- Triple

Synopsis

- mapPair :: (a -> c, b -> d) -> (a, b) -> (c, d)
- mapFst :: (a -> c) -> (a, b) -> (c, b)
- mapSnd :: (b -> c) -> (a, b) -> (a, c)
- swap :: (a, b) -> (b, a)
- mapTriple :: (a -> d, b -> e, c -> f) -> (a, b, c) -> (d, e, f)
- mapFst3 :: (a -> d) -> (a, b, c) -> (d, b, c)
- mapSnd3 :: (b -> d) -> (a, b, c) -> (a, d, c)
- mapThd3 :: (c -> d) -> (a, b, c) -> (a, b, d)
- uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d

# Pair

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

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

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

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

# Triple

mapTriple :: (a -> d, b -> e, c -> f) -> (a, b, c) -> (d, e, f) Source

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

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

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

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