Re[2]: [Haskell-cafe] Paths to tree

2007-01-31 Thread Bulat Ziganshin
Hello John, Tuesday, January 30, 2007, 2:57:04 PM, you wrote: mergeForest2 = map pairToNode . Map.toList . Map.map mergeForest2 . Map.fromListWith (++) . map nodeToPair My problem I guess is being able to write the code this way when the need

Re: [Haskell-cafe] Paths to tree

2007-01-31 Thread Pixel
Bulat Ziganshin [EMAIL PROTECTED] writes: btw, are you seen http://haskell.org/haskellwiki/Simple_unix_tools ? :) : This is intended as a beginners tutorial for learning Haskell from a : Lets just solve things already! point of view. The examples should : help give a flavour of the beauty and

Re: [Haskell-cafe] Paths to tree

2007-01-30 Thread John Ky
Hi Tomasz, I actually quite like this style. I was able to understand it after spending some time reading the docs for some of the functions you used. My problem I guess is being able to write the code this way when the need arises or even just recognising when and where it's an option, both

[Haskell-cafe] Paths to tree

2007-01-29 Thread John Ky
Hi, I've written some code and was wondering if there was a better way to write it in terms of readability, brevity and/or efficiency. The function concerned is pathsToForest which takes a list of paths (ie. [[String]]) and converts it into a tree structure where the individual nodes are the