[Haskell-cafe] Rose Tree

Andrew Wagner wagner.andrew at gmail.com
Sat Nov 3 23:13:30 EDT 2007


I think it's not at all clear what you're asking for here. can you
give an example inputs and outputs you'd expect? It looks like you're
trying to implement some kind of dictionary or something? Also, have
you looked at the library Data.Tree? It might be useful for you.

On 11/3/07, Ryan Bloor <ryanbloor at hotmail.com> wrote:
>
> Hello,
>
>
>  I need help... I am having trouble with rose trees.
>
>                                                   1
>
>                                    2             3
>  4
>                             5     6     7               8    9    10     11
>
>  That is the rose tree that I seek.
>
>  Data Tree a = Empty | Leaf a | Node a [(Tree a)]
>
>  example :: Tree (String, String)
>  example = Node ("a","b")     -- root node
>                      [
> ........................................] -- end of tree
>
>  What I want to do is create two functions that return either the children
> or parents of a given input, here a String.
>   String -> Tree -> [String]         I think
>
> ________________________________
> Play Movie Mash-up and win BIG prizes!
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>


More information about the Haskell-Cafe mailing list