Haskell Language Common functors as the base of cofree comonads Cofree Identity ~~ Stream


Example

Given

data Identity a = Identity a

we have

data Cofree Identity a
     = a :< Identity (Cofree Identity a)

which is isomorphic to

data Stream a = Stream a (Stream a)