True = (lambda (t f) (t))
-- Let True be the function that takes two parameters t and f and returns the first, t. --
False = (lambda (t f) (f))
-- Let False be the function that takes two parameters t and f and returns the second, f. --
If = (lambda (b tr fa) (b tr fa))
-- Let If be the function that takes three parameters, and applies the first parameter b to the second and third parameters. --
Notice that if the parameter b is the True value above, 'b tr fa' will return 'tr'. If 'b' is False, 'b tr fa' will return 'fa'
(lambda (x)
(If x
(lambda () (display "It was true!"))
(lambda () (display "It was false!"))))
So it follows that this will pass either "It was true!" or "It was false!" to 'display', waving aside all the stuff you have to define that makes 'display' and STRINGS work as you'd expect.This is where it becomes clear that you need a lazy system for this to make sense. In an eager system all three of the parameters to 'If' are evaluated and then their values are substituted into the body of 'If'. In a lazy system the expressions for the values are substituted for the parameters in the body, so only the parameter 'b' and one of the other parameters will be evaluated.
When I play around with functional languages I would just write
True t f = t
False t f = f
If b tr fa = b tr fa
ShowIt x = If x (display "It was true!") (display "It was false!")
You could also write this in (I think this is) Scheme: (define True (t f) (t))
(define False(t f) (f))
(define If (b tr fa) (b tr fa))
(define ShowIt (x) (If (x (display "It was true!") (display "It was false!"))))
Except that Scheme isn't usually lazy.