Why is there no mutable TreeMap in Scala?

It’s just a missing case that will presumably eventually be filled in. There is no reason not to do it, and in certain cases it would be considerably faster than the immutable tree (since modifications require log(n) object creations with an immutable tree and only 1 with a mutable tree).


Edit: and in fact it was filled in in 2.12.

Mutable TreeMap.

(There is a corresponding Set also.)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)