[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issue: STRUCTURE-INFO (Version 1)

Is this proposal still necessary?

Date: Tue, 20 Sep 88 19:46 PDT
 From: Gregor.pa
Subject: Re: [Kent M Pitman <KMP@STONY-BROOK.SCRC.Symbolics.COM>: Issue:
To: masinter.pa
Fcc: BD:>Gregor>mail>outgoing-mail-4.text.newest
In-Reply-To: The message of 20 Sep 88 17:42 PDT from masinter.pa
Message-ID: <19880921024606.6.GREGOR@PORTNOY.parc.xerox.com>
Line-fold: no

I don't have time to write this up.  But here is some code:

(defun structurep (x)
  (typep (class-of x) 'structure-class))

(defun structure-contents (x)
  (mapcar #'(lambda (slot-description)
	      (let ((name (slot-description-name slot-description)))
		(list name (slot-value x name))))
	  (class-slots (class-of x))))