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: John Wiegley
Subject: Re: The poor state of documentation of pcase like things.
Date: Fri, 01 Jan 2016 09:46:29 -0800
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.5 (darwin)

>>>>> 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. Also, `0 could just be 0.

One thing it does do: avoids repeating "skip" in the first two tests. That's
the only merit I can see, but would have been more worthwhile if there were,
say, 10 value tests.

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2



reply via email to

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