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
(defn recursive-rule | |
"A recursive rule for establishing prototype inheritance/isa relationship. | |
Can specify a maximum depth to travel, or none if there are no restrictinos. | |
rule The name of the rule | |
e The entity | |
a The attribute | |
v The value | |
Should be creating the rule like: (recursive-rule 'isa '?e '?a '?v) | |
Then within a query, can refer to it like this: | |
(isa ?e :thing/isa ?v) " |