title: How to accept an async function as an argument?
body: <p>I would like to replicate the behavior and ergonomics of taking a closure/function as an argument much like <code>map</code> does: <code>iterator.map(|x| ...)</code>.</p>
  
  <p>I've noticed that some library code allows passing in async functionality, but this method doesn't allow me to pass in arguments:</p>
  
  <pre><code>pub fn spawn&lt;F, T&gt;(future: F) -&gt; JoinHandle&lt;T&gt;
  where
      F: Future&lt;Output = T&gt; + Send + 'static,
      T: Send + 'static,
  </code></pre>
  
  <pre><code>spawn(async { foo().await });
  </code></pre>
  
  <p>I'm hoping to do one of the following:</p>
  
  <pre><code>iterator.map(async |x| {...});
  </code></pre>
  
  <pre><code>async fn a(x: _) {}
  iterator.map(a)
  </code></pre>