`
(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))
`