Chapter 2: Pattern Matching and Basic Operations