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: Wed, 08 Jul 2015 19:32:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

> It could also skip those elements that don't match

That's what I had expected without thinking too much about it.  But I
agree that we would end with something different.

> For pcase-dolist, I think the right name to use is `dolist'.

Sounds good!

> > Anyway, an idea that came to my mind more than once: `when-let',
> > `if-let' should really be `pcase-when-let' , `pcase-if-let'.  They
> > would be much more useful than the plain versions I think.
>
> Yes, feel free to change them that way.

Though, just changing them would break existing code (the current
versions are about boolean values, the pcase versions would be about
pattern matching).

For example, now

  (if-let ((a (ignore))) a 17)       ==> 17,

but

  (pcase-if-let ((a (ignore))) a 17) ==> nil.


Michael.




reply via email to

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