Clojure 如何从数据日志中的转换函数创建集合结构?

Clojure 如何从数据日志中的转换函数创建集合结构?,clojure,datomic,datalog,Clojure,Datomic,Datalog,我想从许多模式变量创建一个列表,这样我就可以比较列表而不是单个模式变量 也就是说,不写 [:find ?attr :where ;; Many lines of data patterns and predicates ;; And now, the comparison point to point [(= :v11 :v21)] [(= :v12 :v22)] ;; ... [(= :v1n :v2n)]] 写一些类似于: [:find ?attr :where ;; M

我想从许多模式变量创建一个列表,这样我就可以比较列表而不是单个模式变量

也就是说,不写

[:find ?attr
 :where
 ;; Many lines of data patterns and predicates
 ;; And now, the comparison point to point
 [(= :v11 :v21)]
 [(= :v12 :v22)]
 ;; ...
 [(= :v1n :v2n)]]
写一些类似于:

[:find ?attr
 :where
 ;; Many lines of data patterns and predicates
 ;; Create 2 lists
 ['(v11 v12 ... v1n) v1]
 ['(v21 v22 ... v2n) v2]
 [(= v1 v2)] ;; <-- Only one line for this comparison in this transformation function
[:查找?属性
:在哪里
多行数据模式和谓词
创建两个列表
['(v11 v12…v1n)v1]
['(v21 v22…v2n)v2]

[(=v1 v2)];我真的不明白这个问题……你能澄清一下想要的行为吗?@AlanThompson在数据日志查询中,你可以编写转换函数:[(函数arg1…argn)?bindin]。但我无法编写返回列表的转换函数。我想编写[(列表?变量_1?变量_2)?列表_1]但我不能。转换函数的解释: