A Neighborhood of Infinity Showing posts sorted by relevance for query zipper . Sort by date Show all posts Showing posts sorted by relevance for query zipper . Sort by date Show all posts google_ad_section_start(name=default) Friday, January 26, 2007 The Monads Hidden Behind Every Zipper Uustalu points out that behind every zipper lies a comonad. I used this in my cellular automaton example . What he doesn't mention is that there is also a monad lurking behind every zipper and that it arises in a natural way. The catch is that it's a monad in the wrong category making it tricky to express in Haskell. Firstly, what does "wrong category" mean? In the category of vector spaces, every object is equipped with a commutative binary + operator. We can make no such assumption in Haskell. What's more, Haskell doesn't easily allow us to restrict type con...