Map (higher-order function): Difference between revisions

Content deleted Content added
See also: typo fix
Generalization: add see also
Line 11:
 
==Generalization==
{{see also|Functor|Category theory}}
In the [[Haskell (programming language)|Haskell programming language]], the [[Type polymorphism|polymorphic]] function &nbsp;<code>map :: (a -> b) -> [a] -> [b]</code> is generalized to a [[Polytypic function|polytypic]] function called <code>fmap :: Functor f => (a -> b) -> f a -> f b</code>, which applies to any type in the [[functor (category theory)|<code>Functor</code>]] class.