      (assoc anchor-circle :lead-link
             {:name lead-link-name :email lead-link-email}))))
 
-(defn- add-if [map key value]
+(defn- assoc-if [map key value]
   (if value
     (assoc map key value)
     map))
 
 (defn- make-role [purpose domains accountabilities]
   (-> {}
-      (add-if :purpose purpose)
-      (add-if :domains domains)
-      (add-if :accountabilities accountabilities)))
+      (assoc-if :purpose purpose)
+      (assoc-if :domains domains)
+      (assoc-if :accountabilities accountabilities)))
 
 (defn add-role
   "Adds a role to a circle.  The role may not conflict with an existing role.

    (throw (IllegalArgumentException. "No role specified to update")))
  (validate-role-exists circle role-name))

(defn rename-role
  "Rename a role in the given circle."
  [circle role-name new-name]
  (validate-updates circle role-name)
  (update-in circle [:roles]
             s/rename-keys {role-name new-name}))

(defn update-role-purpose
  "Update the purpose of a role in the given circle."
  [circle role-name new-purpose]
  (validate-updates circle role-name)
  (if (empty? new-purpose)
    (update-in circle [:roles role-name]
               dissoc :purpose)

                 (update-in circle [:roles role-name] assoc :domains #{}))]
    (update-in circle [:roles role-name :domains] conj domain)))

(updatefn remove-domain
  "Remove a domain from a role in the given circle."
  [circle role-name domain]
  (validate-domain (comp not contains?)
                   "Domain '%s' doesn't exist on role '%s'"
                   circle role-name domain)
  (let [result (update-in circle [:roles role-name :domains] disj domain)]
    (if (empty? (get-domains result role-name))
      (update-in result [:roles role-name] dissoc :domains)
