Consider the following type:
data Expr1 = Val1 Int | Add1 Expr1 Expr1 | Sub1 Expr1 Expr1
please create a Expr2 type constructor thatalso supports multiplication and division, in addition to the intliteral, addition, and subtraction
Solution
Consider the following type:
data Expr1 = Val1 Int | Add1 Expr1 Expr1 | Sub1 Expr1 Expr1
please create a Expr2 type constructor thatalso supports multiplication and division, in addition to the intliteral, addition, and subtraction
Solution