Edited the pattern-search program from Chapter 4.