On Sat, 3 Jul 2004 17:57:04 +0100 (BST), MR K P SCHUPKE <[EMAIL PROTECTED]> wrote:

The zipper should work on n-ary trees. all the zipper does is
store the tree as (Context,Subtree)

What is the meaning of storing in haskell? Imagine I put numbers in the leaves...
you could do something like
data Context x = Root | Parent x (Context x) [Rose x] [Rose x]
data Rose x = Node x [Rose x]
Should the numbers be of type x ,right?? So x is Int.
   -5
   |
 -2-6
 |
1-3
 |
 -4

context of 1 is Root.Where do I store the 1?I Subtree?The name is misleading me...
context of 2 is Parent 1 Root .....and then


To make it easy I don't mind siblings I just want sons


so at any given point in the tree the context is either Root,
or the Parent (with the value at that node, the parents context,

What do you mean with the parents context?Is it the substitution for the pointer?
Which is the tracker function?


tracker (context,???)
        | (Root,???) = [kkkk] kkkk should be the node 1 where can I get it?
        | (Parent p (Contetx c)....,???) = tracker (c,?!?):kkkk

I feel terrible ........   Paolino










_______________________________________________ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to