Monomorphism
From HaskellWiki
(Difference between revisions)
(This is a wild guess! Somebody check it...) |
m (getrellatro) |
||
| (2 intermediate revisions not shown.) | |||
| Line 1: | Line 1: | ||
| + | drontrcnad | ||
[[Category:Glossary]] | [[Category:Glossary]] | ||
Current revision
drontrcnad
Monomorphism is the opposite of polymorphism. That is, a function is polymorphic if it works for several different types - and thus, a function is monomorphic if it works only for one type.
As an example,map
map :: (a -> b) -> [a] -> [b]
However, the function
foo :: (Int -> Int) -> [Int] -> [Int] foo = map
map
Int
Perhaps you were looking for monomorphism restriction?
