Commit | Line | Data |
---|---|---|
1 | (in-package :lisp-on-lines) | |
2 | ||
3 | (define-description T () | |
4 | ((identity :label nil :function #'identity) | |
5 | (type :label "Type" :function #'type-of) | |
6 | (class :label "Class" :function #'class-of))) | |
7 | ||
8 | (define-layered-method description-of (any-lisp-object) | |
9 | (find-description 't)) | |
10 | ||
11 | (define-display ((description t)) | |
12 | (format *display* "~{~A~%~}" | |
13 | (mapcar | |
14 | (lambda (attribute) | |
15 | (with-output-to-string (*display*) | |
16 | (display-attribute attribute))) | |
17 | (attributes description)))) | |
18 |