previous | index | next

Exercise 7.37 – 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.37 '(a number? c) 
                                                    '(a 13 c))
                '(13)))

(assert (equal? (substitutions-in-to-match-for-7.37 '(a symbol? c) 
                                                    '(a b c))
                '(b)))

(assert (equal? (substitutions-in-to-match-for-7.37 '(number? b number?) 
                                                    '(12 b 14))
                '(12 14)))

(assert (equal? (substitutions-in-to-match-for-7.37 '(symbol? number? symbol?) 
                                                    '(a 13 c))
                '(a 13 c)))

previous | index | next