4 ms·
I think Matt Might did a great demonstration of something easy you can do with type classes that you can't do easily without them, in this article: http://matt
by fusiongyro 14y ago
I think Matt Might did a great demonstration of something easy you can do with type classes that you can't do easily without them, in this article:
http://matt.might.net/articles/best-programming-languages/ http://matt.might.net/articles/best-programming-languages/
In a project of my own I did a similar thing with intervals to what he did with lattices: I defined a type class for intervals and then made lists of intervals an instance of the class. Greatly simplified my own code for very little cost.