lesnitsky / 0110011001110000

1 stars 1 forks source link

Boolean Church Encoding #5

Open DaQuirm opened 4 years ago

DaQuirm commented 4 years ago

Given the following encoding for the boolean values true and false write a conditional (if or cond) function that returns its second or third argument depending on whether the condition (the first argument, a Church-encoded boolean value) is true or false respectively.

true x y = x false x y = y