On Sat, Jan 17, 2009 at 9:13 PM, <rocon...@theorem.ca> wrote: > On Sat, 17 Jan 2009, David Menendez wrote: > >> instance Applicative f => Applicative (Backwards f) where >> pure = B . pure >> f <*> x = B (unB f <**> unB x) > > probably should be f <*> x = B (unB x <**> unB f)
I always get that backwards. > anyhow, this should be part of Control.Applicative. I agree. But until it is, we'll have to make do. >> This may be terminological confusion. I would have said that a >> PointedList *is* a zipper. > > This is what I thought, and what how I initally advised Jeff. However after > carefully reading both <http://en.wikibooks.org/wiki/Haskell/Zippers> and > <http://www.cs.nott.ac.uk/~ctm/Dissect.pdf> (Clowns to the left of me, > jokers to the right), it is clear that formally a zipper focuses on a > sub-list / sub-tree rather than focusing on a particular node of a list or a > tree. Hence zippers are not comonads. Funny, I was just reading that paper earlier today. You're right. I wasn't making enough of a distinction between zippers and structures with one selected element. It's the latter which are comonads. -- Dave Menendez <d...@zednenem.com> <http://www.eyrie.org/~zednenem/> _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell