Hello, I just started my journey in Ocaml been a week and trying to write abstract syntax tree of a simple arithmetic language. There is couple of things that I want to mention An arithmetic expression (expr) will be either a numeric constant called Const, or a variable called Var, or addition (Plus), multiplication (Mult), difference (Minus), or division (Div) of two arithmetic expressions. Since we are dealing with binary arithmetic operators, the arguments are defined with the names Arg1 and Arg2. Finally, writing a function called evaluate, which takes as input a single arithmetic expression you defined

in above, and gives as output its final value. You may assume that the input arithmetic expression to

this function will only non-negative integer numeric values (i.e., no variables and no floats). This was my goal I tried to implement it as following ;

```
type expr =
| Const of int
| Var of string
| Plus of expr* expr (* e1 + e2 *)
| Minus of expr * expr (* e1 - e2 *)
| Mult of expr * expr (* e1 * e2 *)
| Div of expr * expr (* e1 / e2 *)
let rec eval = function
| Const c -> c
| Plus (f, g) -> eval f + eval g
| Minus(f, g) -> eval f - eval g
| Mult(f, g) -> eval f * eval g
| Div(f, g) -> eval f / eval g
;;
```

and the test case I was given was

Plus { arg1 = (Mult {arg1 = Const 2; arg2 = Var â€śxâ€ť});

arg2 = (Mult {arg1 = Const 3; arg2 = (Minus {arg1 = Var â€śyâ€ť; arg2 =Const 1})})

};;

However, I keep getting errors that I have no idea how to fix the hint that I have given was "The way you would want to approach this is to define the type expr as a mutually recursive type using the â€śandâ€ť keyword with two types defined. One of them is defined using â€ś|â€ť and another using â€ś;â€ť

Thatâ€™s about all the hints I give regarding how to do this problem. " if someone can guide me through it would be great.