On 3/5/09, Ryan Ingram <[email protected]> wrote: > ... > Here is the problem with your "update": > > tree = Fork (Leaf 1) (Leaf 2) > ztree = initZ tree > > test = fromJust $ do > z1 <- moveLeft ztree > let z2 = update z1 3 > z3 <- moveUp z2 > z4 <- moveLeft z3 > this z4 > > I'd expect "test" to equal 3, but I believe with your code that it > still equals 1. As apfelmus said, update needs to completely > re-construct the zipper structure with the tied knot, which defeats > the purpose of using a zipper in the first place.
I got it. I dont't know what your expression "tied knot" is referring to but I got the point. Thanks. Cristiano _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
