Hi. I'm learning haskell but i'm stuck on a generic tree folding
exercise. i must write a function of this type
treefoldr::(Eq a,Show a)=>(a->b->c)->c->(c->b->b)->b->Tree a->c
Tree has type
data (Eq a,Show a)=>Tree a=Void | Node a [Tree a] deriving (Eq,Show)
as an example treefoldr (:) [] (++) [] (Node '+' [Node '*' [Node 'x' [],
Node 'y' []], Node 'z' []])
must return "+∗xyz"
any help?
(sorry for my bad english)
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe