At the moment I try to use the map function on a MutableList, because it would be more elegant then iterating with for-loops, imho.
When I do the following:
scala> ml
res2: scala.collection.mutable.MutableList[Double] = MutableList(1.0, 2.0)
So i have a MutableList like this and now I do:
scala> ml.map{ t:(Double) => t+0.2}
res3: scala.collection.mutable.LinearSeq[Double] = MutableList(1.2, 2.2)
I get a LinearSeq back. I want a MutableList back. I assume map-functions on MutableLists arent the right way to do this? Or is there a easy way to go from a LinearSeq to a MutableList?
MutableListback? The result is mutable just as well.MutableListafter the map.. which Scala version is this you're using?