Created
December 15, 2016 10:26
-
-
Save WilliamParker/f0551ec2b9afb8b9e97eea0c41e0c524 to your computer and use it in GitHub Desktop.
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
user> (require 'clara.test-rules) | |
nil | |
user> (in-ns 'clara.test-rules) | |
#namespace[clara.test-rules] | |
clara.test-rules> (defquery query1 | |
"Doc here" | |
[] | |
[?fact <- :a]) | |
#'clara.test-rules/query1 | |
clara.test-rules> (-> (mk-session [query1] :fact-type-fn :clara-fact-type) | |
(insert {:clara-fact-type :a :some-other-key :some-other-val}) | |
fire-rules | |
(query query1)) | |
({:?fact {:clara-fact-type :a, :some-other-key :some-other-val}}) | |
clara.test-rules> (-> (mk-session [query1]) | |
(insert {:clara-fact-type :a :some-other-key :some-other-val}) | |
fire-rules | |
(query query1)) | |
() | |
clara.test-rules> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment