Monday 15 July 2013

Common Lisp: Replace IF with AND & OR? -


I'm stuck with the exercise 4.28. Symbolic calculations from a gentle introduction of the book (p. 129):

We can usually rewrite this simple plan and rewrite it as a combination of more: IF Test true false-part with equivalent expression (or test the right part ) false part ) But why is this plan unsuccessful for the expression (if ODDP5) (FPN) fails to 'FU'? If suggesting more sophisticated ways to re-write in the form of a combination of ANDS and ORs that do not fail.

(and (and oddp 5) (or (7)) evaluates and stops 'FU' true part , And it will evaluate false-part if test was zero, but it always tends if test is t, that if Does not reflect the behavior of what has been learned in this book so far, is the correct solution to this problem, or is the answer to this exercise that there is no one at this point?

Do not say for the sake of if there is one, then do it for me to continue looking for one. Exercise for that.

No comments:

Post a Comment