Lenses over Comonads or Representable
Here's a more specific variant of this question: Mutate only focus of Store Comonad? , for the benefit of not asking more than one question at once. Are there any lenses compatible with Control.Lens which allow me to interact with the focus of a comonad (the value from extract ) or with the index/value of the Store Comonad ( pos )? It seems like lenses may be of some use here, but I have been unable to find anything which fits; any help would be appreciated, thanks! Comonad doesn't give you any way to write back to the comonad's focus, so you can't write a general Lens for extract . But it is