
16 Jun
2009
16 Jun
'09
8:26 p.m.
roconnor@theorem.ca wrote:
I have a new proposal to add swap and swap' to Data.Tuple
I'd ask the opposite of Neil's question - what is a good use case for the extra laziness that swap provides over swap'? It seems to fill a rather small niche to me. To provide the extra laziness, my favourite haskell compiler will have to create and later evaluate two thunks in addition to allocating a new pair. In other words, I'd rather add only one function, swap (a, b) = (b, a) regards, Bertram