An Example of pcase-lambda

Over at the Emacs reddit, instant_sunshine has an example of using pcase-lambda. It's not used very often but can be useful if you have to write functions that need to look inside Lisp objects. The documentation for pcase-lambda is a bit obscure so it helps to have an example of its use.

The idea is that it's like lambda except that the arguments can be any pattern accepted by pcase. Take a look at the pcase documentation or John Wiegley's pcase post to understand what those patterns are.

UPDATE 2016-09-22 19:39:09: Added link.

This entry was posted in Programming and tagged , . Bookmark the permalink.