GNU bug report logs - #16238
24.3.50; pcase docs (and possibly pcase) wrong

Previous Next

Package: emacs;

Reported by: Tassilo Horn <tsdh <at> gnu.org>

Date: Tue, 24 Dec 2013 09:15:02 UTC

Severity: minor

Found in version 24.3.50

Done: Tassilo Horn <tsdh <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Tassilo Horn <tsdh <at> gnu.org>
Cc: 16238 <at> debbugs.gnu.org
Subject: bug#16238: 24.3.50; pcase docs (and possibly pcase) wrong
Date: Tue, 24 Dec 2013 09:53:35 -0500
> (defun evaluate (exp env)
>   (pcase exp
>     (`(add ,x ,y)         (+ (evaluate x env) (evaluate y env)))
>     (`(call ,fun ,arg)    (funcall (evaluate fun) (evaluate arg env)))
>                                                 `--- HERE!

Indeed, feel free to fix it.

> But shouldn't `arg' be substituted with 'x and `body' with '(add 1 x)?

No, the code is meant for lexical-binding.


        Stefan




This bug report was last modified 11 years and 155 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.