papers.md: add paper on pattern matching

Closes #387.