Advertisement
Guest User

Clojure macro snippet

a guest
Jan 4th, 2012
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (def current-state {:funcs [] :data [] :pc 0 :name :entry})
  2.  
  3. (defmacro with-state [state body]
  4.     `(let [{:keys [funcs data pc name]} ~state]
  5.         ~body))
  6.  
  7. (with-state current-state (println name))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement