I'm trying to return a mutable Sequence with an until loop, but i have an immutable seq in return of (0 until nbGenomes) :
def generateRandomGenome(nbGenomes:Int): IndexedSeq[GenomeDouble]={
return ((0 until nbGenomes toSeq).map{e => generateRandomGenome})
}
Return compilation error :
found : scala.collection.immutable.IndexedSeq[org.openmole.tools.mgo.mappedgenome.genomedouble.GenomeDouble]
required: scala.collection.mutable.IndexedSeq[org.openmole.tools.mgo.mappedgenome.genomedouble.GenomeDouble]
return ((0 until nbGenomes toSeq).map{e => generateRandomGenome})
How i can force the until loop to return an mutable seq ? Thanks scala community!