title: Discriminated union member methods
body: <p>I want to define a method shared by all members of a discriminated union.  Currently I've implemented it like this, but it seems really inelegant- surely there is a better way. Suggestions?</p>
  
  <pre><code>type A = 
     {AData:string}
     member this.SharedMethod (x:float) : int= ...
  type B =
     {BData:float}
     member this.SharedMethod (x:float) : int= ...
  type AB =
  | A of A
  | B of B
  
  let CallSharedMethod (ab:AB) x =
     match ab with
     | AB.A(a') -&gt; a'.SharedMethod x
     | AB.B(b') -&gt; b'.SharedMethod x
  </code></pre>