I need a function that will test if a symbol is the name of a class,
i.e. (CLASS.NAME? X) should return T if X = 'ALIEN-CRAFT and
ALIEN-CRAFT has been defined to be a class in CLOS. Can anyone tell me
if this function already exists or how to create it?
--
_____________________________________________________________________
__ __ __ __ __ __ __ __ __ __ __
|__| |__| |__| |__| |__| |__| |__| |__| |__| |__| |__| |
Steven Vere ····@ix.netcom.com
Boulder Creek, California
__ __ __ __ __ __ __ __ __ __ __
|__| |__| |__| |__| |__| |__| |__| |__| |__| |__| |__| |
_____________________________________________________________________
In article <··········@ixnews2.ix.netcom.com> ····@ix.netcom.com (Steven Vere ) writes:
>
> I need a function that will test if a symbol is the name of a class,
> i.e. (CLASS.NAME? X) should return T if X = 'ALIEN-CRAFT and
> ALIEN-CRAFT has been defined to be a class in CLOS. Can anyone tell me
> if this function already exists or how to create it?
(find-class x)
In article <··········@ixnews2.ix.netcom.com> ····@ix.netcom.com (Steven Vere ) writes:
> I need a function that will test if a symbol is the name of a class,
>i.e. (CLASS.NAME? X) should return T if X = 'ALIEN-CRAFT and
>ALIEN-CRAFT has been defined to be a class in CLOS. Can anyone tell me
>if this function already exists or how to create it?
(find-class x nil)
If you really want to return t (rather than the class object):
(defun CLASS.NAME? (x) (when (find-class x nil) 't))
-- Dan