Question: Haskell - Using the definition for a Term as: data Term = Var String | Application Term Term | Lambda String Term Construct a Beta-Reduction
Haskell - Using the definition for a Term as:
data Term = Var String | Application Term Term | Lambda String Term
Construct a Beta-Reduction Haskell function as per the definition below:
betaReduce :: Term -> Term -> Term
It can assume its first argument is a lambda expression. Note: If the formal parameter of that lambda expression is free in the second argument, it must alpha rename it.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
