title: Scala: Map keys with wildcards?
body: <p>Is it possible to use keys with wildcards for Scala Maps? For example tuples of the form (x,_)? Example:</p>
  
  <pre><code>scala&gt; val t1 = ("x","y")
  scala&gt; val t2 = ("y","x")
  scala&gt; val m = Map(t1 -&gt; "foo", t2 -&gt; "foo")
  
  scala&gt; m(("x","y"))
  res5: String = foo
  
  scala&gt; m(("x",_))
  &lt;console&gt;:11: error: missing parameter type for expanded function ((x$1) =&gt; scala.Tuple2("x", x$1))
                m(("x",_))
                       ^
  </code></pre>
  
  <p>It would be great if there was a way to retrieve all (composite_key, value) pares where only some part of composite key is defined. Other ways to get the same functionality in Scala?</p>