Question : function signature haskell
Answered by : renz-carillo
-- three degrees of polymoprhism in type signature
foo :: a -- any / all types, i.e. parametrically polymorphic | typically used when argument is any type/typeclass
bar :: Show a => a -- some types, i.e. ad-hoc polymorphic | typically used when argument is typeclass
qux :: Bool -- one type, i.e. monomorphic | typicaly used when argument is primitive type
Source : | Last Update : Sun, 29 May 22