Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SETF methods and SETF functions

13 views
Skip to first unread message

Vladimir Zolotykh

unread,
Jan 2, 2002, 12:32:21 PM1/2/02
to
Consider the following:

(defstruct s-1
k)

(defmethod (setf set-s-k) (new (f s-1))
(setf (foo-k f) new))

Could you tell me:

(1) What is the name of the GF this method defined on?

(2) How to write this method in the style
(defgeneric foo (a b)
(:method
;; .......
))

(2) How I can find this method e.g (FIND-METHOD ...

Also I'd like to know how to remove it but this is probably will be
obvious where I'll know answers to the Q above.

Closely related question is about SETF functions(e.g (DEFUN (SETF FOO)
...). Plain function could be introduced with DEFUN and could be
FMAKUNBOUNDed. What syntax for actions similar to FMAKUNBOUND used for
SETF functions ?

--
Vladimir Zolotykh gsm...@eurocom.od.ua

Erik Naggum

unread,
Jan 2, 2002, 12:58:28 PM1/2/02
to
* Vladimir Zolotykh <gsm...@eurocom.od.ua>

| (1) What is the name of the GF this method defined on?

(setf set-s-k)

Look up "function name" in the glossary.

///
--

Vladimir Zolotykh

unread,
Jan 3, 2002, 10:29:00 AM1/3/02
to
Thank you. Yesterday my first attempt was

(find-method #'(setf set-s-k) '() (list (find-class s-1)))

but I've forgotten the built in class T. in the list of
specializers.This misled me and I decided (wrongly) that I use wrong
syntax for that.

Nevertheless I've learn subject better.

--
Vladimir Zolotykh gsm...@eurocom.od.ua

0 new messages