查看conso的文档,这似乎表明地图没有被适当地视为集合
user> (coll? {:a 1}) ; Just for context
true
user> (first {:a 1})
[:a 1]
user> (run* [p q] (conso p q {:a 1})) ; This is the surprising part
()
user> (run* [p q] (conso p q [[:a 1]])) ; For comparison
([[:a 1] ()])
user> (doc conso) ; Docs talk about collection as expected input
-------------------------
clojure.core.logic/conso
([a d l])
A relation where l is a collection, such that a is the first of l
and d is the rest of l. If ground d must be bound to a proper tail.
nil
编辑:这对集合也不起作用
user> (run* [p q] (conso p q #{1 3}))
()
user> (first #{1 3})
1
user> (coll? #{1 3})
true