title: waiting for a function to finish with completion handler fails
body: <p>I am trying to wait for an asynchronous function to finish before processing it's data (e.g. saving it to my database).</p>
  
  <p>I have a function <code>loadFacebookDetails()</code> containing two tasks:</p>
  
  <ol>
  <li>Loading Data from Facebook <code>makeRequest()</code></li>
  <li>Saving the Data to my Database <code>saveAndProceed()</code></li>
  </ol>
  
  <p>I need <code>makeRequest()</code> -> (asynchronous) to finish before handling the saving.</p>
  
  <p>This is what I got so far:
  I declared a <code>typealias FinishedDownload = () -&gt; ()
  </code>
  I created:</p>
  
  <pre><code>func makeRequest(completed: FinishedDownload){
  .... // bunch of code
  completed() // call that I completed my task at end of function
  
  
  }
  </code></pre>
  
  <p>now I don't now how to call makeRequest in my loadFacebookDetails.</p>
  
  <p>I also created this:</p>
  
  <pre><code>makeRequest { () -&gt; () in
  saveAndProceed()
  }
  </code></pre>
  
  <p>and my saveAndProceed().
  Does anyone now how to make this syntactical correct?</p>