This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- The key difference between parametric polymorphism and overloading (aka ad-hoc | |
-- polymorphism) is that parameteric polymorphic functions use one algorithm to | |
-- operate on arguments of many different types, whereas overloaded functions may | |
-- use a different algorithm for each type of argument. | |
-- John Mitchell, Concepts in Programming Languages | |
-- http://stackoverflow.com/a/13043262/382982 | |
-- ad hoc/constrained => typeclasses | |
plus :: (Num a) => a -> a -> a |