1.2.0 permalink Arrow_down_16x16



  • (deftarget sym doc & forms)

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source lancet.clj:92 top

(defmacro deftarget [sym doc & forms]
  (swap! targets #(conj % sym))
  (let [has-run (gensym "hr-") reset-fn (gensym "rf-")]
    `(let [[~has-run ~reset-fn once-fn#] (runonce (fn [] ~@forms))]
       (def ~(with-meta sym {:doc doc :has-run has-run :reset-fn reset-fn})
Vars in lancet/deftarget: conj defmacro let swap! with-meta apply concat fn list seq vector
Used in 0 other vars

Comments top

No comments for deftarget. Log in to add a comment.