Possible duplicate:How can I convert immutable.Map to mutable.Map in Scala?
How to create a new mutable map with the contents of an immutable map in Scala?
So far I have tried:
val m:scala.collection.mutable.Map[Int, Double] = scala.collection.mutable.Map[Int, Double](imm.map({case(key, value) => (key -> value) }))
to no avail.
val im = Map(1->1.0, 2->3.0) val mm = collection.mutable.Map[Int,Double]() ++= im
val immM = Map(1 -> 2) val mutM = collection.mutable.Map(immM.toSeq: _*)
Source: https://habr.com/ru/post/907127/More articles:Smart way to use aspell to automatically correct the passage? - automationPaypal concurrent payment IPN problem - phpPayPal Parallel Payment IPN - paypalActiveAdmin: how to override index controller action: undefined `base 'method for nil: NilClass - ruby-on-railsListView with horizontalScrollView OnItemClick not working - androidactiveadmin custom render if - ruby-on-rails-3.2Why does Date.new not cause initialization? - dateDoesn't Android have enough tiles for the page? - androidAssociating a Multiple Definition Problem with a Compilation Error - cHow to fix Undefined characters for i386 architecture: "_main" binding problem? - iosAll Articles