
19 Apr
2006
19 Apr
'06
3:48 p.m.
Cale Gibbard wrote:
I should perhaps point out that in the development GHC (iirc), there is a library called Data.Sequence which uses 2-3 finger trees to get rather nice efficient sequences. Operations on both ends (appending or dropping) are constant time, while operations in the middle tend to be on the order of the logarithm of the distance to the closer of the two ends. For instance, concatenation and splitting at a point both have complexity proportional to the logarithm of the smaller of the two parts involved.
Does anyone know where I can download this from (since I was just about to try to implement exactly this myself based on the paper)? I can't find it listed in the hierarchical libraries for ghc. Thanks, Brian.