Relative Content

Tag Archive for haskellfunctional-programminglambda-calculus

Trouble implementing beta-reduction rules in Haskell for a case construct

I am working on implementing a Haskell program that involves adding beta-reduction rules for a case construct. Specifically, I need to handle cases where the first subterm of a case has been reduced to a value tagged with either inl or inr. In each case, I’m supposed to select the appropriate body and substitute the value for the bound variable.