On Mon, 14 Feb 2011 12:54:55 +0100 Tillmann Rendel <ren...@informatik.uni-marburg.de> wrote:
> 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 _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe