On 01/16/2012 03:26 PM, Evan Laforge wrote:
> Often when I define some type that wraps something else, I find myself writing
> a function like the following:
>
> newtype Thing = Thing X
> liftThing f (Thing x) = Thing (f x)
>
> It's like a Functor, but I can't make it an instance because Functor
>
Often when I define some type that wraps something else, I find myself writing
a function like the following:
newtype Thing = Thing X
liftThing f (Thing x) = Thing (f x)
It's like a Functor, but I can't make it an instance because Functor
requires that the type be parametric. So I've been using