
is #'equalp OK for structures?
Quote:
> I want to compare two structures. The following code returns T,
>which is what I want. Is there a `better accepted' way to test for
>equality of differing structures? Thanks.
> (defstruct node name and other stuff here)
> (equalp (make-node)(make-node))
P.109 of CLtL2 explains precisely how EQUALP should behave for structures,
as clarified by X3J13. Briefly, it returns T if the structures are the
same type and all the slots are EQUALP.
Whether this is what you want isn't obvious from your example, since you
don't show what the slots contain (so whether recursively comparing them
with EQUALP is appropriate for your application).
--
Barry Margolin
System Manager, Thinking Machines Corp.