EMA-XPS Online
ADD-TO-SET
ADD-TO-SET
==========
syntax: (add-to-set <lisp-type: T>
<evaluates-to <set-of A (...)>>
[:TEST <lisp-type: function>])
==> <set-of A (...)> | <new-set-of A (...)>
This function adds an element to a set.
Warning: type checking may cause an error:
if all elements of a set have the same
type, check the first elem. with CAVEAT:
what about empty set ?!?
example: >(add-to-set bonn *capital-cities*)
Error: The elementtype restriction
is used wrong.
>(add-to-set hamburg *cities*)
#<set-of CITY (...)>
>(set-to-list *)
(#<CITY HAMBURG> #<CAPITAL-CITY PARIS>
#<CITY DORTMUND> #<CAPITAL-CITY
BRUESSEL> #<CITY BONN>
#<CAPITAL-CITY BERLIN>)
EMA-XPS Online