`
(ns test
(:refer-clojure :exclude [==])
(:require
[clojure.core.logic :refer :all]))
(defn foo [in out]
(matcha
[in out]
([('and a b . ()) ('and x y . ())] (foo a x) (foo b y))
([a ('bar ('baz a . ()) . ())])))
;; 我在使用以下代码时遇到了栈溢出,但如果我们删除其中一个合取项,它就可以运行。
(run 1 [q] (foo
'(and p
(and p
(and p
(and p
(and p
(and p
(and p
(and p
(and p
(and p
(and p p)))))))))))
q))
`