title: SML interpreter.My Div func is working but i am having issue with my Minus func. I want it to give an error when the passed error is not a number
body: <pre><code>datatype exp = Int of int | Minus of exp * exp | Div of exp * exp;
  
  
  datatype value = CVal of int 
                 | FnVal of string * exp * (string * value) list 
                 | Error of string;
  
  fun eval (Int x) _ = CVal x 
    | eval (Div (e1, e2)) ctx = let val (CVal x) = eval e1 ctx
                                    val (CVal y) = eval e2 ctx
                                in if y = 0
                                   then Error "Division by zero error"
                                   else CVal (x div y)
                                end
    | eval (Minus (e1, e2)) ctx = let val (CVal x) = eval e1 ctx
                                      val (CVal y) = eval e2 ctx
                                  in if x &lt;&gt; Int orelse y &lt;&gt; Int
                                     then Error "Minus error : not an integer"
                                     else CVal (x - y)
                                  end;
  </code></pre>