title: Swift - How to return a bool closure
body: <p>I'm trying to write a function that returns a Bool:</p>
  
  <pre><code>func registerForPushNotifications() -&gt; (Bool) -&gt; Void {
      UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound, .badge]) {
          [weak self] granted, error in
          return { granted }
      }
  }
  </code></pre>
  
  <p>But I get this Error:</p>
  
  <pre><code>Cannot convert return expression of type 'Void' to return type '(Bool) -&gt; Void'
  </code></pre>
  
  <p>What am I doing wrong?</p>