Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (quote a) -> a
- (quote {}) -> {}
- CL-USER> (quote ())
- NIL
- (defun as-keyword (sym)
- (intern (string sym) :keyword))
- (defun slot->defclass-slot (spec)
- (let ((name (first spec)))
- `(,name :initarg ,(as-keyword name) :accessor ,name)))
- (defmacro define-binary-class (name slots)
- `(defclass ,name ()
- ,(mapcar #'slot->defclass-slot slots)))
- (define-binary-class id3-tag
- ((major-version)))
- (DEFCLASS ID3-TAG NIL
- ((MAJOR-VERSION :INITARG :MAJOR-VERSION :ACCESSOR MAJOR-VERSION)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement