Advertisement
Guest User

Untitled

a guest
Aug 16th, 2015
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (ldb/db-rel mothero parent child)
  2. (ldb/db-rel fathero parent child)
  3.  
  4. (defn parento [parent child]
  5.   (l/conde [(fathero parent child)]
  6.            [(mothero parent child)]))
  7.  
  8. (defn ancestoro [ancestor child]
  9.   (l/conde [(parento ancestor child)]
  10.  
  11.            ;; FIXME: this blows the stack
  12.            ;; NOTE: this is an XOR rather than an inclusive OR
  13.            ;;       maybe conde is not the right one?
  14.            [(l/fresh [a]
  15.               (ancestoro a child)
  16.               (parento ancestor a))]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement