I am blocked since yesterday about a type mismatch error and I don't see how to correct it. Maybe you can help me with it.
def combine( head : (Char,Int), xs : Occurrences) : List[Occurrences] =
xs.map { case (x,i) => for ( occu <- 1 to head._2 ) yield List((x,i), (head._1, occu)) }
Here is the error that I get :
type mismatch;
found : List[scala.collection.immutable.IndexedSeq[List[(Char, Int)]]]
required: List[forcomp.Anagrams.Occurrences]
The type Occurrences is defined as type Occurrences = List[(Char, Int)]
How can I fix this error?