title: Avoid consecutive "if let" declarations in Swift
body: <p>In Swift I used <code>if let</code> declarations to check if my object is not <code>nil</code></p>
  
  <pre><code>if let obj = optionalObj
  {
  }
  </code></pre>
  
  <p>But sometimes, I have to face with consecutive <code>if let</code> declarations</p>
  
  <pre><code>if let obj = optionalObj
  {
      if let a = obj.a
      {
          if let b = a.b
          {
              // do stuff
          }
      }
  }
  </code></pre>
  
  <p>I'm looking for a way to avoid consecutive <code>if let</code> declarations.</p>
  
  <p>I would try something like :</p>
  
  <pre><code>if let obj = optionalObj &amp;&amp; if let a = obj.a &amp;&amp; if let b = a.b
  {
      // do stuff
  }
  </code></pre>
  
  <p>But the swift compiler do not allow this.</p>
  
  <p>Any suggestion ?</p>