title: Higher-kinded types for multisets
body: <p>I would like to write a <code>Multiset[T, S[_]]</code> class in Scala, which takes 2 type parameters: <code>T</code> is the type of the element, whereas <code>S</code> is the underlying representation of the set. 
  In this multiset, an instance of <code>S[(T, Int)]</code> is constructed (in each pair, <code>T</code> is the element and <code>Int</code> is its number of occurrence).
  This is possible in C++:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>template&lt;typename T, template&lt;typename&gt; S&gt;
  </code></pre>
  
  <p>Two questions:</p>
  
  <ul>
  <li><p>How to declare the constraint on <code>S</code> that it must be a set? Does <code>Multiset[T, S[_] &lt;: Set[_]]</code> work?</p></li>
  <li><p>Is it possible to declare the constraint that an instance of <code>S[(T, Int)]</code> can be instantiated? This can be done in C# using the <code>where S: new()</code> constraint.</p></li>
  </ul>