anchor.diff:  MULTIPLE       boolean default NIL indicates whether the same objects may be
                  in relation together several times.
   
  -COPY           if not nil, a function used to copy the objects before storing
  +COPY           if not NIL, a function used to copy the objects before storing
                  or returning them.
   
  -TEST           default is (FUNCTION EQL), the function used to compare object
  -               put in relation.
  -   Note: If you set COPY, you will probably want to set TEST too (default is EQL).
  -         For strings, you may want to set TEST to EQUAL or EQUALP
  -         For numbers, you may want to set TEST to =, etc.
  -         COPY and TEST are evaluated, so you can pass 'fun, (function fun)
  -         or (lambda (x) (fun x)).
  +LESSP          default is NIL.  A function used to compare the objects
  +               put into the relation.
  +
  +TEST           default is (FUNCTION EQL), the function used to compare
  +               the objects put into the relation.
  +
  +   Note: If you set COPY, you will probably want to set TEST or LESSP too.
  +         TEST and LESSP are mutually exclusive.
  +
  +         For strings, you may want to set TEST to EQUAL or EQUALP or
  +         LESSP to STRING< or STRING-LESSP
  +
  +         For numbers, you may want to set TEST to =, or LESSP to <.
  +
  +         COPY, TEST and LESSP are evaluated, so you can pass 'fun,
  +         (function fun) or (lambda (x) (fun x)).
  +
  +ORDERED        (only for REFERENCE, LIST, VECTOR and REIFIED).
  +
  +               NIL:  the objects are not ordered in the containers.
  +
  +               T:    If LESSP is not given, then the objects are kept
  +                     in the order of association in the containers.
  +                     The KEY of the objects are compared with the TEST
  +                     function.
  +
  +                     If LESSP is given, then the objects are kept in
  +                     the order specified by LESSP applied on the KEY
  +                     of the objects.
   
   IMPLEMENTATION is (OR (MEMBER REFERENCE LIST VECTOR HASH-TABLE A-LIST P-LIST REIFIED)
                         (CONS (HASH-TABLE A-LIST P-LIST)
  
positive.code: There may be more than two endpoints, in case of ternary, etc associations.
  
  ENDPOINTS      a list of (ROLE &KEY TYPE ACCESSOR SLOT MULTIPLICITY MULTIPLE
                            IMPLEMENTATION COPY TEST).
  
  
  TYPE           needed for ATTACH and DETACH.
  
negative.code:                        (setf ,(slot) ,(value))))
                ((list)
                 (cond
                   ((eql 1 this-max)
                    `(progn (assert null ,(slot))
                            (setf ,(slot) (list ,(value)))))
                   ((eql '* this-max)
                    (if this-ordered
                      `(progn (assert (not (find ,value ,(slot) :test ,this-test :key ,this-key)))
                             (setf ,(slot) (add-new-element ,(slot) ,(value)
                                                            ,@(if this-lessp-givenp
                                                                `(:lessp ,this-lessp) 
                                                                `(:test ,this-test))
                                                            :key ,this-key)))
                     `(progn (assert (not (find ,value ,(slot) :test ,this-test :key ,this-key)))
                             (pushnew ,(value) ,(slot) :test ,this-test :key ,this-key))))
                   (t
                    (let ((vendpoint (gensym)))
                      `(let ((,vendpoint  ,(slot)))
                         (if (and (<  (length ,vendpoint) ,this-max)
                                  (not (find ,value ,vendpoint :test ,this-test :key ,this-key)))
                           ,(if this-ordered
                              `(setf ,(slot) (add-new-element ,(slot) ,(value)
                                                              ,@(if this-lessp-givenp
                                                                  `(:lessp ,this-lessp) 
                                                                  `(:test ,this-test))
                                                              :key ,this-key))
                              `(push ,(value) ,(slot)))
                             (cerror "Endpoint ~A of association ~A is full, maximum multiplicity is ~A is reached."
                                     ',this-role ',association-name ',this-max)))))))))))))
  
  