Pattern matching is a powerful paradigm in programming. Recent versions of Emacs Lisp implement this paradigm with the pcase
macro. Unfortunately, pcase
can be a bit difficult to understand. Fortunately, our Emacs maintainer, John Wiegley, has published an excellent tutorial on its use.
The tutorial doesn’t address how to leverage pattern matching in your programming but it does cover the use of pcase
. It’s a powerful idea and can often be useful. Take a look at Wiegley’s tutorial to get started.