How can I define type in Scala? Like
type MySparseVector = [(Int, Double)]
in Haskell or
typedef MySparseVector = std::list<std::pair(int, double)>>
in C++?
I tried
type MySparseVector = List((Int, Double))
but can't figure how to make it work. If I write this in the beginning of class file I got "Expected class or object definition" error.
PS Sorry, I mistyped. I tried to use List[(Int, Double)] in Scala.