Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!think!barmar From: barmar@think.COM (Barry Margolin) Newsgroups: comp.lang.lisp Subject: Re: Self-referencing Closures Message-ID: <37134@think.UUCP> Date: 7 Mar 89 18:15:54 GMT References: <6859@phoenix.Princeton.EDU> <52880@yale-celray.yale.UUCP> Sender: news@think.UUCP Reply-To: barmar@kulla.think.com.UUCP (Barry Margolin) Organization: Thinking Machines Corporation, Cambridge, MA Lines: 19 In article <52880@yale-celray.yale.UUCP> Krulwich-Bruce@cs.yale.edu (Bruce Krulwich) writes: > (defun make-closure () > (labels ((-self- () )) > -self-)) Actually, the last form should be #'-self-, since LABELS binds the functional value, not the variable value, of the symbol. >If you really tend towards the boroque you can use "Church's Y operator" which >is defined in Scheme using: You could also simply use LETREC in Scheme. It binds a variable and arranges for the scope to include the value form. Barry Margolin Thinking Machines Corp. barmar@think.com {uunet,harvard}!think!barmar