title: Super simple trailing closure syntax in Swift
body: <p>I am trying to follow the <a href="https://docs.swift.org/swift-book/LanguageGuide/Closures.html#//apple_ref/doc/uid/TP40014097-CH11-XID_161" rel="nofollow noreferrer">example in the Swift docs</a> for a trailing closure.</p>
  
  <p>This is the function:</p>
  
  <pre><code>func someFunctionThatTakesAClosure(closure: () -&gt; Void) {
      // function body goes here
      print("we do something here and then go back")//does not print
  }
  </code></pre>
  
  <p>And I call it here.</p>
  
  <pre><code>        print("about to call function")//prints ok
          someFunctionThatTakesAClosure(closure: {
              print("we did what was in the function and can now do something else")//does not print
          })
          print("after calling function")//prints ok
  </code></pre>
  
  <p>The function, however, is not getting called.  What is wrong with the above?</p>
  
  <p>Here's the Apple example:</p>
  
  <blockquote>
    <p>func someFunctionThatTakesAClosure(closure: () -> Void) {
        // function body goes here }</p>
    
    <p>// Here's how you call this function without using a trailing closure:</p>
    
    <p>someFunctionThatTakesAClosure(closure: {
        // closure's body goes here })</p>
  </blockquote>