Problem PS.4.2.4: Counting utterances
(define *test* '(a b c a b a b a b c b c b c a b c))
(match '(a b c) *test*) => 3 (match '(a b c) '()) => 0 (match '(a b c d) *test*) => 0 (match '(a) *test*) => 5
You may find it helpful to use an internal prodedure that keeps track of where you are in terms of matching the pattern to a spot in the text and where in the list of text words you started this particular match.
Below is an applet that flashes matching parens and does Scheme indenting when you type Tab.