title: Usage of closures with multiple arguments in swift
body: <p>This question is largely based on this one:</p>
  
  <p><a href="https://stackoverflow.com/questions/24031084/closures-return-value-previously-completionblock"><strong>Link</strong></a></p>
  
  <p>The main difference being that I want to pass in arguments to the closure as well. Say I have something like this:</p>
  
  <pre><code>func someFunctionThatTakesAClosure(completionClosure: (venues: Dictionary&lt;String, AnyObject&gt;, error: NSError) -&gt; ()) {
          // function body goes here
          var error: NSError?
          let responseDictionary: Dictionary&lt;String, AnyObject&gt; = ["test" : "test2"]
          completionClosure(venues: responseDictionary, error: error!)
      }
  </code></pre>
  
  <p>No error here. But when I call this function in my main view controller I have tried several ways but all of the result in different errors:</p>
  
  <pre><code>venueService.someFunctionThatTakesAClosure(completionClosure(venues: Dictionary&lt;String, AnyObject&gt;, error: NSError){
  
          })
  </code></pre>
  
  <p>or like this:</p>
  
  <pre><code>venueService.someFunctionThatTakesAClosure((venues: Dictionary&lt;String, AnyObject&gt;, error: NSError){
  
          })
  </code></pre>
  
  <p>or even like this:</p>
  
  <pre><code>venueService.someFunctionThatTakesAClosure(completionClosure: (venues: Dictionary&lt;String, AnyObject&gt;, error: NSError) -&gt; (){
  
              });
  </code></pre>
  
  <p>I'm probably just way tired, but any help would be greatly appreciated!</p>