the constant functor

Koen Claessen [email protected]
Tue, 27 Mar 2001 11:42:15 +0200 (MET DST)

(moved reply to haskell-cafe)

Hi Tobias,

 |   data ConstInt a = Const Int
 | Any ideas how to make 'ConstInt' an instance of class
 | Functor?

What is wrong with:

  class Functor ConstInt where
    map f (Const n) = Const n



Koen Claessen
phone:+46-31-772 5424      mailto:[email protected]
Chalmers University of Technology, Gothenburg, Sweden