[Haskell-cafe] Finger Tree without using Monoid

Heinrich Apfelmus apfelmus at quantentunnel.de
Fri Sep 2 09:58:18 CEST 2011

Chris Smith wrote:
> I'm curious why you wanted a finger tree without the Monoid instance...
> if you need a different Monoid instance, you can probably simplify your
> code significantly by using a newtype wrapper around Seq rather than
> re-implementing it.

Indeed, the whole point of the Monoid is that you can use one and the 
same finger tree implementation for a variety of data structures. 
Practically every tree-based data structure can be obtained this way. 
See also


Best regards,
Heinrich Apfelmus


More information about the Haskell-Cafe mailing list