Skip to content

Instantly share code, notes, and snippets.

@tuturto
Created March 29, 2016 07:22
Show Gist options
  • Save tuturto/0c88e6cbb9feb2fa3221 to your computer and use it in GitHub Desktop.
Save tuturto/0c88e6cbb9feb2fa3221 to your computer and use it in GitHub Desktop.
absento
=> (setv list-1 ["one" "two" "three"])
=> (setv list-2 ["one" "three"])
=>
=> (run* [q]
... (fresh [x y]
... (membero x list-1)
... (conde [(membero x list-2) (unifyo y 2)]
... [#ss (unifyo y 1)])
... (conde [(unifyo y 2) (unifyo q x)])))
['one', 'three']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment