how will i define the function 'simplify' using primitive recursion?
simplify :: Expr -> Expr
...
simplify Simplify an expression using basic arithmetic, e.g. simplify (Plus (Var "x") (Const 0)) = Var "x"
how will i define the function 'simplify' using primitive recursion?
simplify :: Expr -> Expr
...
simplify Simplify an expression using basic arithmetic, e.g. simplify (Plus (Var "x") (Const 0)) = Var "x"