<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.kram.nz/index.php?action=history&amp;feed=atom&amp;title=SE701%3Aclosure.lisp</id>
	<title>SE701:closure.lisp - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.kram.nz/index.php?action=history&amp;feed=atom&amp;title=SE701%3Aclosure.lisp"/>
	<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE701:closure.lisp&amp;action=history"/>
	<updated>2026-09-14T07:48:19Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://wiki.kram.nz/index.php?title=SE701:closure.lisp&amp;diff=25&amp;oldid=prev</id>
		<title>Mark: New page:  ;;; A simple closure in Lisp  (defun make-counter ()    (let ((count 0))      (list #&#039;(lambda () (setq count (1+ count)))  	  #&#039;(lambda () (setq count (1- count)))  	  #&#039;(lambda () count)...</title>
		<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE701:closure.lisp&amp;diff=25&amp;oldid=prev"/>
		<updated>2008-02-15T19:40:17Z</updated>

		<summary type="html">&lt;p&gt;New page:  ;;; A simple closure in Lisp  (defun make-counter ()    (let ((count 0))      (list #&amp;#039;(lambda () (setq count (1+ count)))  	  #&amp;#039;(lambda () (setq count (1- count)))  	  #&amp;#039;(lambda () count)...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt; ;;; A simple closure in Lisp&lt;br /&gt;
 (defun make-counter ()&lt;br /&gt;
   (let ((count 0))&lt;br /&gt;
     (list #&amp;#039;(lambda () (setq count (1+ count)))&lt;br /&gt;
 	  #&amp;#039;(lambda () (setq count (1- count)))&lt;br /&gt;
 	  #&amp;#039;(lambda () count))))&lt;br /&gt;
 &lt;br /&gt;
 (destructuring-bind (inc dec read) (make-counter)&lt;br /&gt;
   (funcall inc)&lt;br /&gt;
   (funcall inc)&lt;br /&gt;
   (funcall inc)&lt;br /&gt;
   (funcall dec)&lt;br /&gt;
   (print (funcall read)))&lt;/div&gt;</summary>
		<author><name>Mark</name></author>
	</entry>
</feed>