
14 Feb
2011
14 Feb
'11
7:24 a.m.
On Mon, 14 Feb 2011 12:54:55 +0100
Tillmann Rendel
This benefit of explicit input and output values can interact nicely with parametric polymorphism:
swap :: (a, b) -> (b, a)
This more general type signature makes sure we are not just returning the input values unswapped.
Good point. This is a good reason why it's good practice to look for possiblity of writing more general functions and types even when they end up being used in a single instance. Pedro