This is the standard cofree comonad package. It provides all sorts of unfolds, but no folds. Why?
- Its opposite free monad provides both.
- Theoretically,
Cofree a f
is a fixed point ofCompose ((, ) a) f
, and a fixed point of any functor supports both folds and unfolds out of the box.
Am I missing something?