title: Idiomatic search of value in a list of element-value pairs in Scala
body: <p>How to <em>idiomaticaly</em> search for an <code>value</code> in a list of <code>(element, value)</code> pairs in Scala? </p>
  
  <p>Are there better (perhaps more succinct and/or efficient) ways than the following solution?</p>
  
  <pre><code>code.find(_._1 == 2).get._2
  </code></pre>
  
  <p>where <code>code</code> is of <code>List[(Int, String)]</code> type?</p>
  
  <pre><code>scala&gt; val code: List[(Int, String)] = (0, "zero") :: (1, "one") :: (2, "two") :: Nil
  code: List[(Int, String)] = List((0,zero), (1,one), (2,two))
  scala&gt; code.find(_._1 == 2).get._2
  res0: String = two
  </code></pre>