Hi the third try...

(defmacro bind-agent
  [a bindings]
  (let [bindings (mapcat (fn [[the-var the-val]]
                           [`(var ~the-var) the-val])
                         (partition 2 bindings))]
    `(let [bound-agent# ~a]
       (alter-meta! bound-agent# assoc
                    :agent-bindings (hash-map ~...@bindings))
       bound-agent#)))

and of course it should return the agent......

Sincerely
Meikel

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to