From ... Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed1.bredband.com!bredband!uio.no!nntp.uio.no!ifi.uio.no!not-for-mail From: Erik Naggum Newsgroups: comp.lang.lisp Subject: Re: Midfunction Recursion Date: 24 Oct 2002 18:42:10 +0000 Organization: Naggum Software, Oslo, Norway Lines: 34 Message-ID: <3244473730396695@naggum.no> References: <3244375917435651@naggum.no> <3244459363713506@naggum.no> <873cqvd9zq.fsf@harris.sdo.us.ray.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: maud.ifi.uio.no 1035484931 8201 129.240.65.5 (24 Oct 2002 18:42:11 GMT) X-Complaints-To: abuse@ifi.uio.no NNTP-Posting-Date: 24 Oct 2002 18:42:11 GMT Mail-Copies-To: never User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.lisp:44588 * Steven E. Harris | It's not yet intuitively evident to me, but I'd like to get to the point | where it is. I consulted the HyperSpec on DO and found this clause: Investigate what the standard has to say on /bindings/. | If so, how could one force the capture of the current value of /i/ to | eventually present (4 3 2 1)? As you would capture any other value in a closure, create a binding and a closure over it. E.g., to return a function that captures a binding: (let ((x )) (lambda (&optional (new nil new-p)) (if new-p (setq x new) x)))) Call the returned function with a value to set the value of the binding, with no value to return the initial or last set value. A more Common Lisp way to do the same would be (let ((x )) (defun x () x) (defun (setf x) (new) (setq x new))) -- Erik Naggum, Oslo, Norway Act from reason, and failure makes you rethink and study harder. Act from faith, and failure makes you blame someone and push harder.