[Haskell-beginners] "Delegating" class instance definition

Nicolaas du Preez njdupreez at yahoo.com
Sun Oct 12 17:43:50 UTC 2014


Thanks for mentioning it; It saves a lot of copy & paste!


On 12 Oct 2014, at 01:03, Nadir Sampaoli <nadirsampaoli at gmail.com> wrote:

> To define an Ord instance you only need to implement compare because the other functions are derivable in terms of it.
> If you wany to explicitly implement max, a correct implementation could be:

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20141012/98ae382a/attachment.html>


More information about the Beginners mailing list