I'm familiar with C# related programming languages, but I have a Haskell question.
I have a string, which is a list of words. I need to put it in a tree structure, and display out. For example, need to display something like this:
The tree should look like this: 1st layer one String, 2nd layer is 3 list of strings, grouped from the 1st layer string, 3rd layer is 3 groups category names as Enum.
"the quick brown fox jumped over the lazy black dog"
("the", "quick", "jumped", "over", "the", "lazy"), ("brown", "black"), ("fox", "dog")
"Other Words", "Colour", "Animal"
So, I can understand if in c#, these can be in a hierarchical class, and ToString to display.
I'm new with Haskell. I wrote the functions to parse the string to the final line of categories, but I can not understand how to put the data in the Tree structure and display?