A question (confusion) about closure
- From: Samik <samikc@xxxxxxxxx>
- Date: Fri, 2 May 2008 01:31:18 -0700 (PDT)
Hi,
I have a confusion regarding closure and its definition. As per Paul
Graham:
When a function refers to a variable defined outside it, it’s called a
free variable. A function that refers to free lexical variable is
called a closure.
However as per CLHS a closure or lexical closure is:
lexical closure n. a function that, when invoked on arguments,
executes the body of a lambda
expression in the lexical environment that was captured at the time of
the creation of the lexical closure, augmented by bindings of the
function's parameters to the corresponding arguments.
lexical environment n. that part of the environment that contains
bindings whose names have lexical scope. A lexical environment
contains, among other things: ordinary bindings of variable names to
values, lexically established bindings of function names to functions,
macros, symbol macros, blocks, tags, and local declarations (see
declare).
Can any pro lisper kindly help me?
Thanks,
Samik
Blog: http://lispsamik.blogspot.com/
.
- Follow-Ups:
- Re: A question (confusion) about closure
- From: viper-2
- Re: A question (confusion) about closure
- From: George Neuner
- Re: A question (confusion) about closure
- From: Edward
- Re: A question (confusion) about closure
- From: Pascal J. Bourguignon
- Re: A question (confusion) about closure
- From: Alan Crowe
- Re: A question (confusion) about closure
- From: John Thingstad
- Re: A question (confusion) about closure
- Prev by Date: Re: load .emacs error
- Next by Date: Re: High Perfomance Computing and Low Latency using Common Lisp
- Previous by thread: Any progress on free open source Windows LISP Versions?
- Next by thread: Re: A question (confusion) about closure
- Index(es):
Relevant Pages
|