emacs-devel
[Top][All Lists]
Advanced

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

Re: pcase-dolist


From: Michael Heerdegen
Subject: Re: pcase-dolist
Date: Thu, 09 Jul 2015 22:27:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

> But that does not match the usual uses of "tuples represented as
> lists", where it's customary to use (A B) when the remaining fields
> are all nil (since (car nil) returns nil and (nth 5 '(1 2)) also
> returns nil rather than signaling an error) and where it's also
> customary to ignore any additional element.

Good argument.  OTOH, if you _want_ to distinguish e.g. a two from a
three element list, you will have to use something like `(,a ,b . ,r)
and test whether r is nil.  Mmh.  Anyway, pcase and pcase-let should
at least behave the same at the end I think...


Michael.




reply via email to

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