SHARE
TWEET

Untitled

a guest Aug 16th, 2015 201 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))]))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top