Use this tag for questions about testing whether a data structure has a particular shape or contains particular values in certain locations.

The three basic control flow mechanism available in all programming languages are selection, iteration, and calling subroutines. In same way that a foreach loop is an evolutionary step for iteration, pattern matching is an evolutionary step for selection.