Using Containers and Type Classes

  • Alejandro Serrano Mena


You have seen how parametric polymorphism and higher-order functions help in the process of abstraction. In this chapter, I’ll introduce a new kind of polymorphism that sits in between parametric and the absence of polymorphism: ad hoc polymorphism. Using this feature, you can express that certain types exhibit a common behavior. And incidentally, you will learn how Haskell makes it possible to use addition, (+), on different numeric types while maintaining a strong type system.


Data Type Binary Tree Time Machine Type Class Neutral Element 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Copyright information

© Alejandro Serrano Mena 2014

Authors and Affiliations

  • Alejandro Serrano Mena
    • 1
  1. 1.MadridSpain

Personalised recommendations