title: Swift function with successHandler that calls other function with successHandler
body: <p>I have a method A that returns a result in a closure. Now this function iterates over other methods B with a successClosure. How do I do this?</p>
  
  <p>PseudoCode:</p>
  
  <pre><code>func methodA(successHandler: @escaping () -&gt; (Int)){
  
     for object in objects{
        object.methodB{
          successHander()
        }
     }
  
  }
  
  func methodB(successHandler: @escaping () -&gt; ()){
     successHander(42)
  }
  </code></pre>