[Haskell-cafe] searching via zipper over a tree

Graham Fawcett graham.fawcett at gmail.com
Thu Apr 24 00:44:25 EDT 2008


Hi folks,

I'm studying zippers (and by extension, the State monad), and have
written a function for finding the first node-location in a 'zippered'
tree that satisfies a predicate:

http://paste.lisp.org/display/59636

(The code uses Krasimir Angelov's Data.Tree.Zipper.) My code works,
but I suspect that I'm working too hard. I would appreciate any
comments!

Regards,
Graham


More information about the Haskell-Cafe mailing list