anchor.diff:                    opinion))))
   
   (defun save-opinion (opin)
  +  "Stores the opinion, represented as an alist, in the database"
     (with-keys (:author :target :id :votevalue :datestamp :url :comment
                         :reference :flag) (alist->hash opin)
       (let* ((user (assoc-cdr :author opin))
  
positive.code: (defun opinion-exists-p (url)
    (get-assoc-by-col (colm 'opinion 'url) url))
  
  (defun get-author-data (aid)
    (map-tuples
     (compose #'keywordize-foreign (curry #'assoc-cdr :type))
     (curry #'assoc-cdr :value)
     (nth-value 1 (get-assoc-by-col (colm 'author 'id) aid))))
  
  (defun author-representation-from-row (data)
    (when data
      (acond
        ((assoc :wf-user data) (values (cdr it) (car it)))
        ((assoc :homepage data) (values (cdr it) (car it)))
        ((assoc :email data) (values (cdr it) (car it))))))
  
  (defun get-author-representation (aid)
    (author-representation-from-row (get-author-data aid)))
  
  (defun get-users ()
    (mapcar #'car (select (colm 'value) :from (tabl 'author)
             :where (sql-= (colm 'type) "wf_user"))))
  
  (defun get-excerpt-data (eid)
    (map-tuples
     (compose #'keywordize-foreign (curry #'assoc-cdr :type))
  
negative.code:                                          :where (sql-= (colm 'url)
                                                         (sql-escape o-url))))))))
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;; Users and Authors
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  
  ;;;;;;;;;;;;;;;;;;;
  ;; Difficulties:
  ;;
  ;; - Users and authors are not always the same thing.
  ;; - Not all authors will have a login at warflagger.
  ;; - If a user logs in to warflagger and claims an email or web address as his own,
  ;; we don't have a way to verify that claim. Therefore we allow a user to possibly
  ;; lay claim to someone else's authorship.
  ;; - There is currently a disjunction between OpinML, Warflagger and OpenID
  ;; user attributes.
  
  (defun get-author-data (aid)
    (map-tuples
     (compose #'keywordize-foreign (curry #'assoc-cdr :type))
     (curry #'assoc-cdr :value)
     (nth-value 1 (get-assoc-by-col (colm 'author 'id) aid))))
  
  (defun author-representation-from-row (data)
    (when data
      (acond
        ((assoc :wf-user data) (values (cdr it) (car it)))
        ((assoc :homepage data) (values (cdr it) (car it)))
        ((assoc :email data) (values (cdr it) (car it))))))
  
  (defun get-author-representation (aid)
    (author-representation-from-row (get-author-data aid)))
  
  (defun get-local-user-id (wf-user)
    (let ((res (select (colm 'author 'id) :from (tabl 'author)
                       :where
  