Re: [Haskell] Beginner - Binary Search Tree Question

2011-02-12 Thread htc2011
Wow, this was a fast reply :-) Thank you Mihai! This works. -- View this message in context: http://haskell.1045720.n5.nabble.com/Beginner-Binary-Search-Tree-Question-tp3382548p3382554.html Sent from the Haskell - Haskell mailing list archive at Nabble.com. _

[Haskell] Beginner - Binary Search Tree Question

2011-02-12 Thread htc2011
Hi All, I am learning Haskell and can't understand the following problem. Maybe somebody could advise me on a solution? Using GHCI, I have the following definition of a BST: data Ord a => BST a = EmptyBST | Node ( BST a ) a ( BST a ) deriving (Show) I want to determine the number of leaves that