anchor.diff:  ;; UNIQUE-MERGE ;;
   ;;;;;;;;;;;;;;;;;;
   
  -(defun %proto-slot/unique-merge
  +(add-strategy :unique-merge 'unique-merge)
  +
  +(defun unique-merge
       (class slot-name &key
        base finder own-finder adder key test
        (accessor slot-name) (reader accessor) own-reader
  
positive.code:                           (slot-value object ',slot-name))
                       (list new-item)
                       :key ,key :test ,test))))))
  
  
  ;;;;;;;;;;
  ;; MAIN ;;
  ;;;;;;;;;;
  
  (defun %proto-slot (class slot-name strategy &rest keys)
    "Dispatch to the appropriate strategy."
    (case strategy
      ((:simple)
       (apply #'%proto-slot/simple class slot-name keys))
      (:unique-merge
       (apply #'%proto-slot/unique-merge class slot-name keys))
      (t (error "Unknown proto-slot strategy ~S" strategy))))
  
  
  (defmacro def-proto-slots (class &body (slot-defs))
    "Define prototypal accessor methods on a class' slots.
    Each slot-def is a list like this:
      (slot-name strategy &rest strategy-keyword-args)
    Available strategies and their valid keyword args are:
      :simple
        :base :accessor :reader :own-reader :writer
      :unique-merge
        :base :accessor :reader :own-reader :writer
        :test :key :finder :own-finder :adder
    See the proto-slots README for details."
    `(progn ,@(mapcar (lambda (slot-def)
                        (apply #'%proto-slot class slot-def))
                      slot-defs)))
  
negative.code: 
  (defpackage #:proto-slots
    (:use :cl)
    (:export def-proto-slots
             get-strategy add-strategy remove-strategy
             simple unique-merge))
  
  (in-package proto-slots)
  
  
  (defparameter *strategies* (list)
    "An alist of proto-slots strategies: (name . func)
    name is the strategy name symbol, usually a keyword.
    func is a function name or a function object.
    NOTE: Data structure may change in a future version.")
  
  
  (defun get-strategy (name)
    "Return the function associated with the given strategy name, or nil
    if that strategy is not registered."
    (cdr (assoc name *strategies*)))
  
  (defun add-strategy (name func)
    "Register the given strategy name, using the given function name or
    function object. If the given strategy name is already registered,
    the existing registration is replaced."
    (setf *strategies*
          (cons (cons name func)
                (remove name *strategies* :key #'car)))
    (values))
  
  (defun remove-strategy (name)
    "Unregister the given strategy name, if it is registered."
    (setq *strategies*
          (remove name *strategies* :key #'car))
    (values))
  
  
  (defmacro def-proto-slots (class &body (slot-defs))
    "Define prototypal accessor methods on a class' slots.
    Each slot-def is a list like this:
      (slot-name strategy &rest strategy-keyword-args)
    Available strategies and their valid keyword args are:
      :simple
        :base :accessor :reader :own-reader :writer
      :unique-merge
        :base :accessor :reader :own-reader :writer
        :test :key :finder :own-finder :adder
    See the proto-slots README for details."
    `(progn
       ,@(mapcar
          (lambda (slot-def)
            (destructuring-bind (slot strategy &rest keys) slot-def
              (let ((func (get-strategy strategy)))
                (if func
                    (apply func class slot keys)
                    (error "Unknown proto-slot strategy ~S for slot ~S"
                           strategy slot)))))
          slot-defs)))
  
  
  (defmacro %proto-method (name args docs &body body)
  