the constant functor

Tobias Haeberlein tobi.haeberlein@gmx.de
Tue, 27 Mar 2001 12:09:59 +0200 (MEST)


 
> What is wrong with:
> 
>   class Functor ConstInt where
>     map f (Const n) = Const n

Ups - absolutely nothing.
I actually tried it with 

 data ConstInt a = Int

and didnt manage to make this an instance of
class Functor. Sorry for giving the wrong 
example.

-Tobi

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net