[previous] [up] [next]     [contents]
Next: Conditionals and Conditional Functions Up: Conditional Expressions and Functions Previous: Booleans and Relations

Functions that Test Conditions

Exercise Notes

Exercise 3.3.1 The = operator works on numbers, only, so trying to test a Boolean function using the pattern

(= (in-interval-1? 0)
   false) 

will not succeed. If a test is supposed to produce false, you can create a test claim using not, instead:
(not (in-interval-1? 0))

Of course, if a test is supposed to produce true, it needs no wrapper.



PLT