[Haskell] Re: Looking for a random-access sequence data structure

Christian Maeder maeder at tzi.de
Fri Jan 13 09:49:27 EST 2006

Christian Maeder wrote:
> seqInsert i v = Map.insert i v
>   . Map.mapKeysMonotonic (\ j -> if j < i then j else j + 1)

Sorry, only O(n) and not O(log n). The same would apply to delete.

More information about the Haskell mailing list