[Haskell-cafe] Re: Trying to implement this code

Lizz Ross lizz2003ross at hotmail.co.uk
Mon Apr 18 16:10:42 EDT 2005

Scott Turner <p.turner <at> computer.org> writes:

> On 2005 April 18 Monday 13:42, Lizz Ross wrote:
> > Im trying to code a function to [...] create
> > a binary search tree containing the Strings and integers (where the
> > integers are the number of occurrences of each word.
> What have you got so far?  Have you declared a data structure for the search 
> tree?
> Have you seen http://haskell.org/hawiki/HomeworkHelp?

So far I have working code to split a string "apple orange banana orange apple
orange" into its component words [apple, orange, banana, orange, apple, orange]

I have then tried to take these words into a binary tree of strings and int's
(where the int is the number of occurrences of that word) although I have had
little success at this stage. 

More information about the Haskell-Cafe mailing list