title: In F#, how can I access attributes on a function?
body: <p>Say I am creating an attribute in F# and I apply it to a function as follows:</p>
  <pre><code>type MyAttribute(value: int) =
      inherit System.Attribute()
      member this.Value = value
  
  [&lt;My(42)&gt;]
  let myFunction() = ()
  </code></pre>
  <p>How can I retrieve that attribute via reflection?</p>
  <p>Ideally I would like to use something along the lines of <code>myFunction.GetType().GetCustomAttributes(true)</code> but that does not work.</p>