
10 Mar
2008
10 Mar
'08
8:11 a.m.
Hi Serge,
I define and use swap (x, y) = (y, x)
because do not find such in the standard library.
You can search for it in the standard libraries using Hoogle: http://haskell.org/hoogle/?q=(a,b)->(b,a)
Please, can people point at it, in the standard library, or at least in GHC?
And as it turns out, it isn't anywhere in the standard libraries. I think this would be a useful function to add to Data.Tuple, so feel free to propose it for addition. Thanks Neil