One of these days, @1HaskellADay posted the following programming challenge:

#1Liner You’re given either fst or snd, but don’t know which. Define a function that returns its dual: dual :: ((a,a) -> a) -> ((a,a) -> a)

My answer to the challenge was fairly straightforward:

dual f = \(x,y) -> f (y, x)

It’s not bad, but nothing compared to Francisco Soares

 dual = uncurry.flip.curry

This is how real Haskell programmers do it. Those that do not eat quiche.