The space requirements of this seem a bit scary. Isn't it just a matter of using the fold function as a representation of the `list'? I.e., you never do the concatenate because all you would do with the result was some kind of fold over it.