title: How to get the name of function argument in F#?
body: <p>Can I write a function which returns the name of the function given as the argument?</p>
  
  <pre><code>let funName f: string =
     // returns the name of f.
  </code></pre>
  
  <p>For example, if I pass <code>printfn</code> as an argument to funName, it returns "printfn".</p>
  
  <pre><code>&gt; funName printfn;;
  val it : string = "printfn"
  </code></pre>
  
  <p>EDIT: I wanted to write a function <code>doc</code> which returns the XML documentation associated with the given function.</p>
  
  <pre><code>let doc f = // returns the XML documentation of the function `f`.
  </code></pre>
  
  <p>To retrieve the summary of the function using something like <a href="https://github.com/kzu/NuDoq" rel="noreferrer">NuDoq</a>, I wanted to know the name of the function.</p>