Not sure if I get this generalization - it's a sequence of matrices that are multiplied. So, one generalization will be IndexedSeq[Literal[R,C,V]] once the compiler is happy with generics.
The next step could be IndexedSeq[Matrix2[R,C,V]] for the "global optimization" TODO.