title: Understanding kotlin executors
body: <p>I understand the concept of executors but i am having some trouble understanding executors in kotlin. Maybe it's the syntax not helping. </p>
  
  <p>Let us look at the following example:</p>
  
  <pre><code>     private class AlwaysCallback(private val executor: (() -&gt; Unit) -&gt; Unit,
                                    private val cb: Progress.() -&gt; Unit) : Callback {
           override fun execute(progress: Progress) {
               executor {
                   progress.cb()
               }
           }
       }
  </code></pre>
  
  <p>If i understood correctly, an executor <code>( () -&gt; Unit ) -&gt; Unit</code> is a vessel for a closure. A block of code that is to be executed. I am not sure if this is true or it is just a vessel for a anonymous function.</p>
  
  <p>Another thing is, could someone explain the syntax:<code>( () -&gt; Unit ) -&gt; Unit</code> ?</p>
  
  <p>I have read the kotlin documentation, read kotlin source code and tried to google it but i am really struggling to understand this. Thank you</p>