Zipper Comonads, Generically
问题 Given any container type we can form the (element-focused) Zipper and know that this structure is a Comonad. This was recently explored in wonderful detail in another Stack Overflow question for the following type: data Bin a = Branch (Bin a) a (Bin a) | Leaf a deriving Functor with the following zipper data Dir = L | R data Step a = Step a Dir (Bin a) deriving Functor data Zip a = Zip [Step a] (Bin a) deriving Functor instance Comonad Zip where ... It is the case that Zip is a Comonad though