Adding swap/compose functions to Data.Tuple and Data.Function

John Wiegley johnw at fpcomplete.com
Tue Nov 20 20:16:22 CET 2012


>>>>> John Wiegley <johnw at fpcomplete.com> writes:

>     swap :: (a,b) -> (b,a)
>     swap = snd &&& fst

> Fairly obvious, but strangely missing.

I'm sorry, I missed that this is already in Data.Tuple, as Hoogle does not
find it.

-- 
John Wiegley
FP Complete                         Haskell tools, training and consulting
http://fpcomplete.com               johnw on #haskell/irc.freenode.net



More information about the Libraries mailing list