[Haskell-cafe] Beginner: (Another) Binary Search Tree Question

2011-02-12 Thread htc2011
Hi all, I just started learning Haskell but am having some trouble getting the insertion into a binary search tree to work and was hoping that somebody could advise me on a possible solution. Thanks. Given the data type definition of the tree to be: Code: data Ord a = BST a = EmptyBST | Node

Re: [Haskell-cafe] Beginner: (Another) Binary Search Tree Question

2011-02-12 Thread Mihai Maruseac
         | v= a = Node a ( insert v b ) c Hi, The quoted line is the problem, you wanted to say Node (insert v b) a c. -- MM ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Beginner: (Another) Binary Search Tree Question

2011-02-12 Thread Daniel Fischer
On Saturday 12 February 2011 15:52:29, htc2011 wrote: Hi all, I just started learning Haskell but am having some trouble getting the insertion into a binary search tree to work and was hoping that somebody could advise me on a possible solution. Thanks. Given the data type definition of the

Re: [Haskell-cafe] Beginner: (Another) Binary Search Tree Question

2011-02-12 Thread htc2011
Ha, of course -- I feel stupid now hehe. Thanks very much! :-) On 12 February 2011 15:06, Daniel Fischer [via Haskell] ml-node+3382792-1536654726-149...@n5.nabble.com wrote: On Saturday 12 February 2011 15:52:29, htc2011 wrote: Hi all, I just started learning Haskell but am having some