haskell - Is there a aggregation version of Sequences exists already? -
consider have sequence of monoid elements, data.sequence great inserting, changing elements in positions.
i'm concerned following query, sum j sequence, returns mconcat of elements position i j. can done using fingertree measure contain both index , mconcat result in o(log n) time.
is there implementation of in haskell library? or have implement data.sequence again ability data.fingertree? (sequence expose little internal structure effectively.)
Comments
Post a Comment