[Haskell-beginners] Type Tree variables

bahadýr altan doaltan at yahoo.co.uk
Sun Mar 11 14:36:32 CET 2012


Hello everyone, I'm trying to write a generic function which works on binary trees. For example my function works on just first three nodes of  a binary tree, but the tree is bigger, I don't care the other nodes. Like this :

function Node a (Node b Subtree Subtree)  (Node c Subtree Subtree)  


The problem is I couldn't find a way to represent "Subtree" structures. A guy here told me to use variables of  type Tree, but I don't know how to create them. Can you tell me how to solve this problem? 
Thanks a lot.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20120311/394cb429/attachment.htm>


More information about the Beginners mailing list