Advanced Pattern Matching, Part 1