Guest User

Untitled

a guest
Nov 25th, 2018
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. (do
  2. (defquery join [:first :height] [[:last :first :email] [:email :height]])
  3. (fact join-last-first-email "Doe" "John" "jdoe@example.com")
  4. (fact join-last-first-email "Doe" "Jane" "jane@example.com")
  5. (fact join-email-height "jane@example.com" 73)
  6. (fact join-email-height "jdoe@example.com" 71)
  7. (join-run))
  8. ;; (["Jane" 73] ["John" 71])
  9.  
  10. (do
  11. (defquery join2 [:firstName :height] [[:e1 :firstName] [:e1 :email] [:e2 :email] [:e2 :height]])
  12. (fact join2-e1-firstName 1 "John")
  13. (fact join2-e1-email 1 "jdoe@example.com")
  14. (fact join2-e1-firstName 2 "Jane")
  15. (fact join2-e1-email 2 "jane@example.com")
  16. (fact join2-e2-email 100 "jane@example.com")
  17. (fact join2-e2-height 100 73)
  18. (fact join2-e2-email 101 "jdoe@example.com")
  19. (fact join2-e2-height 101 71)
  20. (join2-run))
  21. ;; (["John" 71] ["Jane" 73])
Add Comment
Please, Sign In to add comment