int | Add of e * e type e += Sub of e * e let rec eval = function | Int n -> n | Add (n, m) -> eval n + eval m | Sub (n, m) -> eval n – eval m let rec show = function | Int n -> sprintf “%d” n | Add (n, m) -> sprintf “(%s + %s)” (show n) (show m) | Sub (n, m) -> sprintf “(%s - %s)” (show n) (show m) 15 ࣈͷ෦ιʔείʔυͷ ฤूʹΑΔରԠ͕ඞཁ