Question: Consider a function if which takes three arguments, a boolean, an expression to evaluate if the boolean is true, and a second expression to evaluate
Consider a function if 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.
Given the lambda expressions for boolean constants and operators presented in class, write the lambda expression for this if function.
Given the following definitions: true = x.y.(x) false = x.y.(y) not = v.w.x.(v x w) or = v.w.(v v w) and = v.w.(v w v) The functions for and and or are expressed as prefix functions, rather than infix.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
