Re: Confused by behavior of LispWorks for code snippet
- From: Damien Kick <dkixk@xxxxxxxxxxxxx>
- Date: Sun, 30 Sep 2007 05:20:16 -0500
Tobias C. Rittweiler wrote:
Damien Kick <dkixk@xxxxxxxxxxxxx> writes:
I would've expected (EQ #'F #'G) => T. I am getting that result,
i.e. (EQ #'F #'G) => T, with both Allegro CL 8.0 and Clisp. Is
LispWorks mistaken or is that an allowable result?
FUNCTION is allowed to return a fresh function object.
I don't find anything in the hyperspec which seems to support this. I could very well be missing something, though. I do find
<blockquote>
If name is a lambda expression, then a lexical closure is returned. In situations where a closure over the same set of bindings might be produced more than once, the various resulting closures might or might not be eq.
</blockquote>
But there is only one LAMBDA involved and it should only be evaluated once.
But if that was the reason, I would expect that (EQ #'F #'F) => NIL, as FUNCTION would be returning a fresh function object every time, which hardly seems reasonable to me. Am I missing something?
.
- Follow-Ups:
- Re: Confused by behavior of LispWorks for code snippet
- From: Tobias C. Rittweiler
- Re: Confused by behavior of LispWorks for code snippet
- References:
- Confused by behavior of LispWorks for code snippet
- From: Damien Kick
- Re: Confused by behavior of LispWorks for code snippet
- From: Tobias C. Rittweiler
- Confused by behavior of LispWorks for code snippet
- Prev by Date: Re: Confused by behavior of LispWorks for code snippet
- Next by Date: Re: Confused by behavior of LispWorks for code snippet
- Previous by thread: Re: Confused by behavior of LispWorks for code snippet
- Next by thread: Re: Confused by behavior of LispWorks for code snippet
- Index(es):