add ch1 ex6

This commit is contained in:
Juthatip McDevitt 2025-07-27 17:17:31 -05:00
parent aefd22c449
commit b71c505381

View file

@ -33,7 +33,7 @@
;--------------------------------------------------------------------------------------------------------------------------
;ex_6
;Alyssa P. Hacker doesnt see why if needs to be provided as a special form. “Why cant I just define it as an ordinary procedure in terms of cond?” she asks. Alyssas friend Eva Lu Ator claims this can indeed be done, and she defines a new version of if:
;Alyssa P. Hacker doesnt see why if needs to be provided as a special form. “Why cant I just define it as an ordinary procedure in terms of cond?” she asks. Alyssas friend Eva claims this can indeed be done, and she defines a new version of if:
;(define (new-if predicate then-clause else-clause)
; (cond (predicate then-clause)
; (else else-clause))