The notion of pattern matching in correlation with functional programming is discussed. The key feature of pattern matching in simply-typed languages is that the structure of an arbitrary value in a datatype is explained. Pattern matching analyzes constructor patterns on the left-hand sides of functional equations, and is defined by a subsystem of the operational semantics with hard-wired rules for computing substitution from the pattern variables to values. Elementary pattern matching may be recast in abstract form, with a semantics given by translation.
ASJC Scopus subject areas