Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (do
- (defquery join [:first :height] [[:last :first :email] [:email :height]])
- (fact join-last-first-email "Doe" "John" "jdoe@example.com")
- (fact join-last-first-email "Doe" "Jane" "jane@example.com")
- (fact join-email-height "jane@example.com" 73)
- (fact join-email-height "jdoe@example.com" 71)
- (join-run))
- ;; (["Jane" 73] ["John" 71])
- (do
- (defquery join2 [:firstName :height] [[:e1 :firstName] [:e1 :email] [:e2 :email] [:e2 :height]])
- (fact join2-e1-firstName 1 "John")
- (fact join2-e1-email 1 "jdoe@example.com")
- (fact join2-e1-firstName 2 "Jane")
- (fact join2-e1-email 2 "jane@example.com")
- (fact join2-e2-email 100 "jane@example.com")
- (fact join2-e2-height 100 73)
- (fact join2-e2-email 101 "jdoe@example.com")
- (fact join2-e2-height 101 71)
- (join2-run))
- ;; (["John" 71] ["Jane" 73])
Add Comment
Please, Sign In to add comment