Substitution1.init() Substitution1.answer Substitution1.substExpression Substitution1.hint4

Which subcase of case 2 in the substitution algorithm must be considered first when performing the following substitution?

           substExpression

CorrectAnswer
  1. 2a
  2. 2b
  3. 2c
  4. This is not an instance of case 2

First, determine whether case 2 applies or not based on the type of lambda expression that you are substituting into.

If case 2 is applicable, check whether the variable you are substituting for is the same as the parameter of the lambda abstraction you are substituting into.

If case 2 is applicable and the answer to the previous hint is "No" then check whether the parameter of the lambda abstraction you are substituting into occurs free in the expression that you are substituting in.

hint4