title: standard ml datatype function
body: <p>I made a datatype of type number that can be either an int or real, and I need to make a function that adds the 2 numbers of type "number", and what I'm having problem with is with the syntax of defining such a syntax, I tried the following but none seems to work.
  The code I wrote are the following, the following codes are written like this to check that the function recognizes n to be of type number:</p>
  
  <pre><code>fun plus n:number = "type number";
  
  fun plus n:I = "type int of number";
  
  fun plus n:number.I = "type int of number";
  </code></pre>
  
  <p>But none seem to work, is the syntax I'm writing in is correct or is it wrong?
  Thanks</p>
  
  <p>the datatype number i write is:</p>
  
  <pre><code>datatype number = 
    I of int
  | F of real;
  </code></pre>