title: Passing generic parameter when passing function as value
body: <p>if I have a generic <code>function foo&lt;T&gt; : T</code>, is there some way to specify the type of <code>T</code> if passing the function (as opposed to calling it) e.g. <code>map(foo)</code>? the function is generic only in its return type, not in any function parameters.</p>
  
  <p><code>map(foo&lt;{bar}&gt;)</code> does not compile.</p>