[Haskell-beginners] Parametrizing [] as an instance of the Functor type class

Olumide 50295 at web.de
Tue Jan 5 13:33:30 UTC 2016


On 31/12/2015 13:06, Olumide wrote:
> ... considering that Functor is defined as
>
> class Functor f
 >    where fmap :: (a -> b) -> f a -> f b
>

Still on the subject, according to LYH, the above definition(?) is read 
thusly: "fmap takes a function from one type as to another and a functor 
value applied with one type and returns a functor value applied with 
another type".

So if list is "a part of the part of the Functor type class" (quoting 
LYH) how am I to grok a list e.g. [1,2,3] as a "functor value applied to 
a type"?

Thanks,

- Olumide


More information about the Beginners mailing list