previous | index | next

Exercise 7.30

Before querying the database, the test file will make sure your new substitutions-in-to-match procedure works correctly by running these tests:
(assert (equal? (substitutions-in-to-match-for-7.30 '(_ b c) 
                                                    '(a b c)) 
                '(a)))

(assert (equal? (substitutions-in-to-match-for-7.30 '(_ _ _) 
                                                    '(a b c)) 
                '(a b c)))

(assert (equal? (substitutions-in-to-match-for-7.30 '(a (x y z) c) 
                                                    '(a z c)) 
                '(z)))

(assert (equal? (substitutions-in-to-match-for-7.30 '(_ (x y z) ...) 
                                                    '(a z foo bar baz)) 
                '(a z (foo bar baz))))

previous | index | next