title: C# async await in Swift
body: <p>I'm currently playing with closures and chained completions in <code>Swift</code>. I'm quite familiar with the <code>C#</code> style of <code>async</code> and <code>await</code>, so I was wondering how to "translate" the following snippet from <code>C#</code> to <code>Swift</code>.</p>
  
  <pre><code>public async Task SomeFunction(string inputString)
  {
      var first = await GetFirstVariableAsync(inputString);
      var second = await GetSecondVariableAsync(first);
  
      if (second == "some condition")
      {
          first = await GetFirstVariableAsync(inputString);
          var second = await GetSecondVariableAsync(first);
      }
  }
  </code></pre>
  
  <p>Does <code>Swift</code> has a similar construct like <code>await</code>, to wait for a function to complete, without having to nest multiple completion blocks?</p>
  
  <p>Thank you</p>