[GHC] #3298: Add swap to Data.Tuple
GHC
trac at galois.com
Fri Jun 12 17:07:59 EDT 2009
#3298: Add swap to Data.Tuple
-----------------------------+----------------------------------------------
Reporter: r6 | Owner:
Type: proposal | Status: new
Priority: normal | Component: libraries/base
Version: 6.10.2 | Severity: normal
Keywords: | Testcase:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
-----------------------------+----------------------------------------------
I think swap is a widely accepted name for the function. There is only
the question of strictness. I suggest swap for the lazy version and swap'
for the strict version
swap ~(a,b) = (b,a)
swap' (a,b) = (b,a)
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3298>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list