(rontolisp) docs
← cl Package Functions

class-of

(class-of object)

Returns the class METAOBJECT of any value -- the same memoized standard-class instance find-class answers, so (eq (class-of x) (find-class 'name)) holds. A CLOS instance answers its class, a defstruct instance its structure type (as a standard-class instance too -- there is no structure-class), and every other value a slot-less built-in class named integer, string, cons, ..., with t for values outside that set. An array answers the narrowest built-in class that covers it: string for a string, vector for any other rank-1 array, array above and below that rank. Read the name with class-name; type-of is a different, finer view and is unaffected.