Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (ldb/db-rel mothero parent child)
- (ldb/db-rel fathero parent child)
- (defn parento [parent child]
- (l/conde [(fathero parent child)]
- [(mothero parent child)]))
- (defn ancestoro [ancestor child]
- (l/conde [(parento ancestor child)]
- ;; FIXME: this blows the stack
- ;; NOTE: this is an XOR rather than an inclusive OR
- ;; maybe conde is not the right one?
- [(l/fresh [a]
- (ancestoro a child)
- (parento ancestor a))]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement