Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!think!barmar From: barmar@think.com (Barry Margolin) Newsgroups: comp.lang.lisp Subject: Re: updating random slots in (say) defstruct Message-ID: <32860@news.Think.COM> Date: 13 Jan 90 04:48:25 GMT References: <18837@bellcore.bellcore.com> Sender: news@Think.COM Organization: Thinking Machines Corporation, Cambridge MA, USA Lines: 18 In article <18837@bellcore.bellcore.com> pc@flash.bellcore.com writes: >There appears to be no Common LISP way to similarly update a random >slot. The best one can do seems to be: You can do (setq updater-function #'(lambda (object value) (setf (test-one object) value))) (funcall updater-function instance value) In ANSI Common Lisp you'll be able to use #'(setf test-one) to access the updater function directly. -- Barry Margolin, Thinking Machines Corp. barmar@think.com {uunet,harvard}!think!barmar