Add swap to Data.Tuple
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)
Trac metadata
Trac field | Value |
---|---|
Version | 6.10.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | libraries/base |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |