   (let [{element :element, collection :collection} (by-id-with-collection game id)]
     (update-in game [collection id] f)))
 
+; Return the Culture of the entity
 (defn culture [game x]
   {:pre [(not (nil? x))]}
   (.culture (to-political-entity game x)))

         {:element res :collection %2}))
    nil [:groups :settlements :political-entities]))

(defn by-id [game id]
  "Return the element associated to the id"
  (:element (by-id-with-collection game id)))

(defn required-by-id [game id]

    (required-by-id game (:political-entity-id group))
    (catch IllegalArgumentException e
      (throw (IllegalStateException. (str "Political entity for group " group " not found") e)))))

(defn society [game el]
  (.society (to-political-entity game el)))
