previous | index | next

Exercise 7.34 – substitutions-in-to-match

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.34 '(a b ...) 
                                                    '(a b c d e))
                '((c d e))))

(assert (equal? (substitutions-in-to-match-for-7.34 '(a b ... e) 
                                                    '(a b c d e))
                '((c d))))

(assert (equal? (substitutions-in-to-match-for-7.34 '(a b ... e) 
                                                    '(a b 1 2 3 4 5 e))
                '((1 2 3 4 5))))

(assert (equal? (substitutions-in-to-match-for-7.34 '(a b ... e _ (x y)) 
                                                    '(a b 1 2 3 4 5 e foo y))
                '((1 2 3 4 5) foo y)))

previous | index | next