[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sending function arguments to recursive function calls
From: |
Stefan Monnier |
Subject: |
Re: sending function arguments to recursive function calls |
Date: |
Wed, 08 May 2013 08:25:55 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> (make-scale-adjuster 42)
> --> #[nil "\301\302!!\207" [inc text-scale-adjust abs] 3 nil nil]
> (make-scale-adjuster 33)
> --> #[nil "\301\302!!\207" [inc text-scale-adjust abs] 3 nil nil]
> (eq (make-scale-adjuster 42)
> (make-scale-adjuster 33))
--> t
> Here when compiling the function the closure inside is compiled at the
> same time, and when calling the compiled function, the same closed
> function is returned. (It is a little strange that they're eq, since
They're `eq' because you compiled them in dynamic-binding mode
(i.e. they won't work).
> A good trick is to wrap all your special^W dynamic variables in stars:
> (defvar *dynamic-variable* 'dyn)
That's the Common-Lisp convention, but Elisp uses another convention,
which is to add a "package prefix" such as `mypackage-myvar'.
Stefan
- Re: sending function arguments to recursive function calls, (continued)
- Re: sending function arguments to recursive function calls, Gauthier Östervall, 2013/05/17
- Re: sending function arguments to recursive function calls, Dmitry Gutov, 2013/05/17
- RE: sending function arguments to recursive function calls, Drew Adams, 2013/05/17
- Re: sending function arguments to recursive function calls, Dmitry Gutov, 2013/05/19
- RE: sending function arguments to recursive function calls, Drew Adams, 2013/05/21
- Message not available
- Re: sending function arguments to recursive function calls, Pascal J. Bourguignon, 2013/05/19
- Re: sending function arguments to recursive function calls, Dmitry Gutov, 2013/05/20
- Message not available
- Re: sending function arguments to recursive function calls, Pascal J. Bourguignon, 2013/05/20
- Re: sending function arguments to recursive function calls, Pascal J. Bourguignon, 2013/05/07
- Message not available
- Re: sending function arguments to recursive function calls, Pascal J. Bourguignon, 2013/05/07
- Re: sending function arguments to recursive function calls,
Stefan Monnier <=
Re: sending function arguments to recursive function calls, Stefan Monnier, 2013/05/04