Abstract
Pure pattern calculus supports pattern-matching functions in which patterns are first-class citizens that can be passed as parameters, evaluated and returned as results. This new expressive power supports two new forms of polymorphism. Path polymorphism allows recursive functions to traverse arbitrary data structures. Pattern polymorphism allows patterns to be treated as parameters which may be collected from various sources or generated from training data. A general framework for pattern calculi is developed. It supports a proof of confluence that is parameterised by the nature of the matching algorithm, suitable for the pure pattern calculus and all other known pattern calculi. © 2009 Copyright Cambridge University Press.
Cite
CITATION STYLE
Jay, B., & Kesner, D. (2009). First-class patterns. Journal of Functional Programming, 19(2), 191–225. https://doi.org/10.1017/S0956796808007144
Register to see more suggestions
Mendeley helps you to discover research relevant for your work.