Re: spec 3.1.2.1.2 and the lambda exception
From: Marcin 'Qrczak' Kowalczyk (qrczak_at_knm.org.pl)
Date: 08/24/04
- Next message: Björn Lindberg: "Re: performance challenge"
- Previous message: David Steuber: "Re: (Web programming) Newby Qs Re: [ANNOUNCE] mod_lisp 2.38"
- In reply to: Pascal Bourguignon: "Re: spec 3.1.2.1.2 and the lambda exception"
- Next in thread: Kaz Kylheku: "Re: spec 3.1.2.1.2 and the lambda exception"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 24 Aug 2004 21:43:33 +0200
On Tue, 24 Aug 2004 00:31:51 +0200, Pascal Bourguignon wrote:
> Note however that you can still play some tricks:
>
> CL-USER> (defun make-adder (x) `(lambda (y) (+ ,x y)))
> MAKE-ADDER
> CL-USER> (#.(make-adder 1) 1)
> 2
>
> Of course, the adder will be created at read time instead of run time.
Its source will be created at read time, but the actual function object
will be created at runtime. If you want to use a closure created at read
time, it must be applied using something like funcall.
--
__("< Marcin Kowalczyk
\__/ qrczak@knm.org.pl
^^ http://qrnik.knm.org.pl/~qrczak/
- Next message: Björn Lindberg: "Re: performance challenge"
- Previous message: David Steuber: "Re: (Web programming) Newby Qs Re: [ANNOUNCE] mod_lisp 2.38"
- In reply to: Pascal Bourguignon: "Re: spec 3.1.2.1.2 and the lambda exception"
- Next in thread: Kaz Kylheku: "Re: spec 3.1.2.1.2 and the lambda exception"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|