【发布时间】:2018-04-22 18:45:31
【问题描述】:
设不可变 Seq 的不可变 Seq 为:
val content: Seq[Seq[Double]
我想将其转换为可变 Seq 的可变 Seq:
val mutable_being_inversed_matrix:
collection.mutable.Seq[collection.mutable.Seq[Double]] =
content.to[collection.mutable.Seq[collection.mutable.Seq[Double]]
但这会产生以下错误:
Error:(79, 128)
scala.collection.mutable.Seq[scala.collection.mutable.Seq[Double]]
takes no type parameters, expected: one
val mutable_being_inversed_matrix: collection.mutable.Seq[collection.mutable.Seq[Double]] = content.to[collection.mutable.Seq[collection.mutable.Seq[Double]]]
如何处理?
【问题讨论】:
标签: scala immutability mutable