|
From: | David Kastrup |
Subject: | Re: The poor state of documentation of pcase like things. |
Date: | Fri, 01 Jan 2016 19:39:35 +0100 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
John Wiegley <address@hidden> writes: >>>>>> Eli Zaretskii <address@hidden> writes: > >> (pcase skip >> (`nil nil) >> (`0 t) >> (_ (setq i (+ i skip -1)) (funcall get-next-frame))))))) > > (cond ((null skip)) > ((eq skip 0) t) > (t (setq i (+ i skip -1)) > (funcall get-next-frame))) > > Not much difference. If skip is nil, the first returns probably nil and the second t. One could probably do (and skip (or (eql skip 0) (setq ...))) I'm not fond of eq for numeric comparisons: that's an Elispism. -- David Kastrup
[Prev in Thread] | Current Thread | [Next in Thread] |