title: When should we use FSharpFunc.Adapt?
body: <p>Looking at the source in FSharp.Core and PowerPack, I see that a lot of higher-order functions that accept a function with two or more parameters use <a href="http://msdn.microsoft.com/en-us/library/ee370316.aspx" rel="noreferrer">FSharpFunc.Adapt</a>. For example:</p>
  
  <pre><code>let mapi f (arr: ResizeArray&lt;_&gt;) =
     let f = FSharpFunc&lt;_,_,_&gt;.Adapt(f)
     let len = length arr
     let res = new ResizeArray&lt;_&gt;(len)
     for i = 0 to len - 1 do
         res.Add(f.Invoke(i, arr.[i]))
     res
  </code></pre>
  
  <p>The documentation on <code>FSharpFunc.Adapt</code> is fairly thin. Is this a general best practice that we should be using any time we have a higher-order function with a similar signature? Only if the passed-in function is called multiple times? How much of an optimization is it? Should we be using <code>Adapt</code> everywhere we can, or only rarely?</p>
  
  <p>Thanks for your time.</p>