Possible Duplicate:
How can I convert immutable.Map to mutable.Map in Scala?
How do I create a new mutable map with the contents of the 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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With