Created
December 18, 2012 00:49
-
-
Save jirkamarsik/4323906 to your computer and use it in GitHub Desktop.
A macro for collecting all predicates of a given class from my namespace and wrapping them in a disjunction.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro transformo | |
"Is satisfied when out-tree is a normalized version of the in-tree | |
node. Tries to use any goal annotated with ::rule." | |
[in-tree out-tree] | |
`(conde ~@(for [[sym var] (ns-interns *ns*) | |
:when (::rule (meta var))] | |
[(list sym in-tree out-tree)]))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment