hi, i was wondering if there are functions in lisp that lets me check if an object or defstruct object is certtain defstruct object

as if
if i have

(defstruct (firstthing (:conc-name nil)) first second)
(defstruct (somethingelse (:conc-name nil)) blah blah)

and i instanciated

(setf thing (make-firstthing :first '(a) :second '(b)))

how do i check if thing is an instance of firstthing or somethingelse?

(typep thing 'first) will do what you want.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.