Simon Marlow wrote:
Jonathan Cast wrote:
Define

    swap (a, b) = (b, a)

ew, that's far too crude.  I think you mean

  swap = uncurry $ flip (,)

I think I would prefer something that mirrors flip more closely:

    swap :: ((a,b) -> c) -> (b,a) -> c
    swap = uncurry . flip . curry

- Jake
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to