Advertisement
Guest User

Untitled

a guest
Dec 9th, 2012
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (defmacro defstage [stagename & body]
  2.   `(defn ~stagename [~'caller]
  3.       (let [~'trxn (atom [])]
  4.         ~@body
  5.         (forward ~'caller @~'trxn)))
  6.   `(swap! *services* #(assoc % (name '~stagename) ~stagename)))
  7.  
  8. (defmacro go [stagename args]
  9.   `(swap! ~'trxn #(conj % [~stagename ~args])))
  10.  
  11. (defstage foobar
  12.   (go :ftp  {:host "ftp-host"}))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement