title: Scala Option - Getting rid of if (opt.isDefined) {}
body: <p>My code is becoming littered with the following code pattern:</p>
  
  <pre><code>val opt = somethingReturningAnOpt
  if (opt.isDefinedAt) {
      val actualThingIWant = opt.get
  }
  </code></pre>
  
  <p>Is there some way to simplify this? (it seems needlessly complex and a code smell). Ideally it would be something like:</p>
  
  <pre><code>if (Some(actualThingIWant) = somethingReturningAnOpt) {
     doSomethingWith(actualThingIWant)
  }
  </code></pre>
  
  <p>Is anything like that possible?</p>