Primitive recursion

how can I define a "simplify" function using primitive recursion?

simplify :: Expr β†’ Expr
  ...

simplify Simplify the expression using basic arithmetic, for example. simplify (Plus (Var "x") (Const 0)) = Var "x"

0
lambda functional-programming haskell lambda-calculus


source to share


No one has answered this question yet

See similar questions:

1
How can I simplify the below expressions using primitive recursion?

or similar:

1516
What is tail recursion?
268
Algebra overuse of algebraic data types - why does it work?
75
Can lambda functions be recursive?
25
How do I write a recursive lambda expression in Haskell?
6
primitive haskell module recursion
6
How do I simplify a basic arithmetic expression?
3
Primitive recursive functions
2
A program for finding the result of primitive recursive functions
2
Algebraic types in haskell
-4
Represent arithmetic expressions



All Articles
Loading...
X
Show
Funny
Dev
Pics