emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The poor state of documentation of pcase like things.


From: Richard Stallman
Subject: Re: The poor state of documentation of pcase like things.
Date: Thu, 17 Dec 2015 23:07:53 -0500

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > There are many special UPatterns, and their variety makes this the hardest
  > aspect to master. Let's consider them one by one.

  > ## Underscore `_'

  > To match against anything whatsoever, no matter its type or value, use
  > underscore. Thus to match against a list containing anything at all at its
  > head, we'd use:

  >     (pcase value
  >       (`(_ 1 2)
  >        (message "Matched a list of anything followed by (2 3)")))

I don't follow this part.  (_ 1 2) seems to be a QPattern.
Is that right?  So how is it that an element can be a UPattern?

It would help if some of the examples used symbols inside a QPattern,
without comma, so we can see what that does.

-- 
Dr Richard Stallman
President, Free Software Foundation (gnu.org, fsf.org)
Internet Hall-of-Famer (internethalloffame.org)
Skype: No way! See stallman.org/skype.html.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]