title: Synthax of firstly in PromiseKit 6
body: <p>I would like to use this method from PromiseKit but dont know how to write propper synthax :x</p>
  
  <pre><code>public func firstly&lt;U: Thenable&gt;(execute body: () throws -&gt; U) -&gt; Promise&lt;U.T&gt; {
  do {
      let rp = Promise&lt;U.T&gt;(.pending)
      try body().pipe(to: rp.box.seal)
      return rp
  } catch {
      return Promise(error: error)
  }
  </code></pre>
  
  <p>}</p>
  
  <pre><code> firstly {
             return someMethodWhichReturnsPromise()
          }.then{
      }
   ...
  </code></pre>
  
  <p>How can I invoke this?
  Code is from: <a href="https://github.com/mxcl/PromiseKit/blob/master/Sources/firstly.swift" rel="nofollow noreferrer">https://github.com/mxcl/PromiseKit/blob/master/Sources/firstly.swift</a></p>