Skip to content

Instantly share code, notes, and snippets.

@tuturto
Created October 7, 2015 18:25
Show Gist options
  • Save tuturto/715b654400d7480d4e2a to your computer and use it in GitHub Desktop.
Save tuturto/715b654400d7480d4e2a to your computer and use it in GitHub Desktop.
Bots build bots
;; do-trigger should be ~name, but there's two levels of quasi-quotes
(defmacro method-with-attributes [name]
`(defmacro effect-trigger [attributes body]
`[do-trigger (fn [self dying-rules]
(let [~@(genexpr `[~x (. self ~x)] [x attributes])]
~body))]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment