structureをコピーして、その一部のスロットを更新したstructureを返す関数を作りたいんだけど
setfでアップデートするところでエラーが出るんだ...
誰か助けて

こんな感じに使いたい。
(update-structure player :name "hoge")
(update-structure pos :x 3)

; 以下はコード
(defun update-struct (structure key value)
(let* ((head (type-of structure))
(copy-fn (symbol-function (symb "COPY-" head)))
(copy (funcall copy-fn structure))
(update-fn (symbol-function (symb head "-" key)))
)
; コピーしたstructureをアップデート
(setf (funcall update-fn copy)
value)
copy))

(setq a (make-pos :x 0 :y 0))
(update-struct a :x 3)