Everything About ___
Live briefing

Everything about Pattern matching

Functional programming construct

In computer science, pattern matching is the act of checking a given sequence of tokens for the presence of the constituents of some pattern. In contrast to pattern recognition, the match usually must be exact: "either it will or will not be a match." The patterns generally have the form of either sequences or tree structures. Uses of pattern matching include outputting the locations of a pattern within a token sequence, to output some component of the matched pattern, and to substitute the matching pattern with some other token sequence. Wikipedia →

🧭 Start here: a 6-step reading path

  1. Read the overview: Pattern matchingA 5-minute orientation
  2. Skim a recent paper: The dynamics of pattern matching in camouflaging cuttlefishInfluential work since 2022
  3. Pick up a classic book: Information routing, correspondence finding, and object recognition in the brainThe most-reprinted book on the subject
  4. Read the landmark paper: Fast Pattern Matching in StringsCited 2,025 times
  5. Go sideways: Algebraic data typeA closely related topic
  6. Go sideways: Haskell featuresA closely related topic

📖 Definitions

Noun The act of checking some sequence of tokens for the presence of the constituents of a pattern.

🗂️ The subject at a glance

  1. History
  2. Terminology
  3. Types
  4. Usage

🏆 Landmark papers (most cited)

🆕 Influential since 2022

📚 Books worth reading

Ranked by number of editions on Open Library, a rough measure of how lasting a book is.

🔗 Related topics