title: What's the difference between () -> Unit and (Unit) -> Unit types?
body: <p>I have following functions: </p>
  
  <pre><code>fun &lt;T, U&gt; process(t: T, call: (U) -&gt; Unit, map: (T) -&gt; U) = call(map(t))
  
  fun &lt;T&gt; processEmpty(t: T, call: () -&gt; Unit) = process(t, call, {}) // error
  </code></pre>
  
  <p>but the <code>processEmpty</code> is not compiling. The error message is <code>Type mismatch: inferred type is () -&gt; kotlin.Unit but (kotlin.Unit) -&gt; kotlin.Unit was expected</code>. But if I change this function to </p>
  
  <pre><code>fun &lt;T&gt; processEmpty2(t: T, call: (Unit) -&gt; Unit) = process(t, call, {}) // OK
  </code></pre>
  
  <p>So what's the difference between <code>() -&gt; Unit</code> and <code>(Unit) -&gt; Unit</code> types? Why first version of <code>processEmpty</code> isn't compiling?</p>