[Haskell-cafe] Incorrectly inferring type [t]

Henning Thielemann lemming at henning-thielemann.de
Thu Dec 30 13:10:27 CET 2010

On Wed, 29 Dec 2010, william murphy wrote:

> Hi All,
> I've spent a lot of time trying to write a version of concat, which concatenates lists of any
> "depth":
> So:
> concat'' [[[1,2],[3,4]],[[5]]]               would return: [1,2,3,4,5]

You can nicely solve this problem in Haskell 98 using a Tree data 
structure. Data.Tree might help and also has a 'flatten' function.

More information about the Haskell-Cafe mailing list