Consider a function ite (for if then else) which takes three arguments: a boolean, an expression to evaluate if the boolean is true, and a second expression to evaluate if the boolean is false. a) Given the lambda expressions for boolean constants and operators, write the lambda expression for this ite function. b) Write the lambda expression for a function iteite (for if then elseif then else) which takes five arguments: a boolean, an expression to evaluate if the boolean is true, another boolean, an expression to evaluate if the second boolean is true, and a third expression to evaluate if both booleans are false. You may assume that a correct implementation of function ite from (a) is available to you, and use it if you like.
Consider a function ite (for if then else) which takes three arguments: a boolean, an expression to evaluate if the boolean is true, and a second expression to evaluate if the boolean is false.
a) Given the lambda expressions for boolean constants and operators, write the lambda expression for this ite function.
b) Write the lambda expression for a function iteite (for if then elseif then else) which takes five arguments: a boolean, an expression to evaluate if the boolean is true, another boolean, an expression to evaluate if the second boolean is true, and a third expression to evaluate if both booleans are false. You may assume that a correct implementation of function ite from (a) is available to you, and use it if you like.

Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images









