15 Jun 09:59 2012

## Data.Tuple impoverished

Andreas Abel <andreas.abel <at> ifi.lmu.de>

2012-06-15 07:59:40 GMT

2012-06-15 07:59:40 GMT

Hi, the module Data.Tuple offers a sad collection of 5 functions. Many standard functions are missing. For instance, I'd expect all the functions of Data.Tuple.HT (package utility-th) to be part of Data.Tuple, which are 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) -- swap is present in Data.Tuple forcePair :: (a, b) -> (a, b) fst3 :: (a, b, c) -> a snd3 :: (a, b, c) -> b thd3 :: (a, b, c) -> c curry3 :: ((a, b, c) -> d) -> a -> b -> c -> d uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d Is there a good reason why they aren't? Cheers, Andreas P.S.: I have reimplemented all these functions for myself, because I use them, but I am puzzled why they are not in the standard library. -- --(Continue reading)