In Dr. Benjamin Pierce's Types and Programming Languages, page 58 notes:
Another language feature than can be easily encoded in the lambda-calculus is boolean values and conditions. Define the terms
truandfalsas follows:
tru = $\lambda$t. $\lambda$f. t;
fals = $\lambda$t. $\lambda$f. f;
The terms
truandflscan be viewed as representing the boolean values "true" and "false," in the sense that we can use these terms to perform the operation of testing the truth of a boolean value.
Looking at the tru definition (if that's the right word), what does each term mean? I assume that t is the argument to the function?
In short, I'm requesting an explanation of the terms of tru. In addition, I'd appreciate an explanation of how tru would be called/invoked.
(const True) :: b -> Boolin Haskell. So,trucan be expressed in Haskell as:tru = const True, no? – Kevin Meredith Oct 16 '16 at 15:02truare simply arguments? Andtis the output representing theTrueBoolean, i.e. a constant? – Kevin Meredith Oct 16 '16 at 15:05