legitimate closure?
- From: Mirko.Vukovic@xxxxxxxxx
- Date: Sat, 30 Aug 2008 13:09:48 -0700 (PDT)
This closure works on clisp on cygwin+windows:
cl-user> (let ((list (list 1 2 3 4 5))
(item 4))
(delete item list :test #'(lambda (unused b) (= item b))))
(1 2 3 5)
I used closure for lambda to get "item" from delete's first argument
The straightforward version is
cl-user> (let ((list (list 1 2 3 4 5))
(item 4))
(delete item list :test #'(lambda (a b) (= a b))))
I'm not sure why would this ever be useful, but I was surprised that
lambda captured it.
Mirko
.
- Follow-Ups:
- Re: legitimate closure?
- From: Alex Mizrahi
- Re: legitimate closure?
- From: Pascal J. Bourguignon
- Re: legitimate closure?
- From: Rainer Joswig
- Re: legitimate closure?
- Prev by Date: Re: How much tuning does regular lisp compilers do?
- Next by Date: Re: legitimate closure?
- Previous by thread: Re: tracing all functions in a package
- Next by thread: Re: legitimate closure?
- Index(es):