title: How to write inline lambda expression for a specific signature
body: <p>This is making my brain melt. Given these signatures of <code>IApplicationBuilder</code> how do I write a lambda expression that satisfies the extension method?</p>
  
  <pre><code>public IApplicationBuilder Use(Func&lt;RequestDelegate, RequestDelegate&gt; middleware)
  </code></pre>
  
  <p>Extension method: (I want to satisfy this extension)</p>
  
  <pre><code>public static IApplicationBuilder Use(this IApplicationBuilder app, Func&lt;HttpContext, Func&lt;Task&gt;, Task&gt; middleware)
  </code></pre>
  
  <p>This is what I have now:</p>
  
  <pre><code>app.Map("/home/abc", config =&gt;
      {
          config.Use(async (context, next) =&gt; // this matches Func&lt;RequestDelegate, RequestDelegate&gt;
          {
          });
      });
  </code></pre>