previous | index | next

Exercise 7.29

Before querying the database, the test file will make sure your new matches? predicate works correctly by running these tests:
(assert (equal? (matches?-for-7.29 '(_ b _) 
                                   '(a b c)) 
                #t))

(assert (equal? (matches?-for-7.29 '(_ x _) 
                                   '(a b c)) 
                #f))

(assert (equal? (matches?-for-7.29 '(a (b c) d) 
                                   '(a c d)) 
                #t))

(assert (equal? (matches?-for-7.29 '(a (b c) d) 
                                   '(a e d)) 
                #f))

(assert (equal? (matches?-for-7.29 '(a _ ...) 
                                   '(a b c d e)) 
                #t))

previous | index | next