Peter Norvig's pat-match converted to elisp.