title: Typedef in Scala
body: <p>How can I define type in Scala?
  Like</p>
  
  <pre><code>type MySparseVector = [(Int, Double)]
  </code></pre>
  
  <p>in Haskell or</p>
  
  <pre><code>typedef MySparseVector = std::list&lt;std::pair(int, double)&gt;&gt; 
  </code></pre>
  
  <p>in C++?</p>
  
  <p>I tried</p>
  
  <pre><code>type MySparseVector = List((Int, Double))
  </code></pre>
  
  <p>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.</p>
  
  <p>PS Sorry, I mistyped. I tried to use List[(Int, Double)] in Scala.</p>