title: Using multiple let-as within a if-statement in Swift
body: <p>I'm unwrapping two values from a dictionary and before using them I have to cast them and test for the right type. This is what I came up with:</p>
  
  <pre><code>var latitude : AnyObject! = imageDictionary["latitude"]
  var longitude : AnyObject! = imageDictionary["longitude"]
  
  if let latitudeDouble = latitude as? Double  {
     if let longitudeDouble = longitude as? Double {
         // do stuff here
     }
  }
  </code></pre>
  
  <p>But I would like to pack the two if let queries into one. So that it would something like that:</p>
  
  <pre><code>if let latitudeDouble = latitude as? Double, longitudeDouble = longitude as? Double {
      // do stuff here
  }
  </code></pre>
  
  <p>That syntax is not working, so I was wondering if there was a beautiful way to do that.</p>