Hi,
Defstruct doesn't define a new type in the OO sense. You can test for
presence of keys, e.g.
(every? #{:name :age} (keys president))
will return true, because 'president' has both :name and :age keys.
But other structures might also have these keys, so this is "duck
typing" at best.
Others have suggested using metadata to "tag" struct values with type
information -- that might be an option you prefer over
key-comparision.
Best,
Graham
>
> Thanks in advance.
>
>
> >
>