initSubstitutionCases() getAnswerSubstitutionCases() "1a" "1b" "2a" "2b" "2c" "3"

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

CorrectAnswer
  • Option0
  • Option1
  • Option2
  • Option3
  • Option4
  • Option5

First, determine which one of case 1, case 2, or case 3 applies based on the type of lambda expression that you are substituting into.

If case 1 is applicable, check whether the variable you are substituting for is equal to the lambda expression 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.