Haskell Language Common functors as the base of cofree comonads Cofree (Reader x) ~~ Moore x


Example

Given

data Reader x a = Reader (x -> a)

we have

data Cofree (Reader x) a
     = a :< (x -> Cofree (Reader x) a)

which is isomorphic to

data Plant x a
     = Plant a (x -> Plant x a)

aka Moore machine.