Fork me on GitHub
#datomic
<
2021-06-09
>
favila17:06:56

Is this a bug? I expect _ not to unify across destructuring-binds, but it looks like it does! Using latest on-prem version.

(d/q '[:find ?a ?b
       :where
       [(ground [0 2]) [_ ?a]]
       [(ground [1 2]) [_ ?b]]
       ])
=> #{} ; WAT?
(d/q '[:find ?a ?b
       :where
       [(ground [1 2]) [_ ?a]]
       [(ground [1 2]) [_ ?b]]
       ])
=> #{[2 2]}
(d/q '[:find ?a ?b
       :where
       [(ground [[1 2]]) [[_ ?a]]]
       [(ground [[1 2]]) [[_ ?b]]]
       ])
=> #{[2 2]}
(d/q '[:find ?a ?b
       :where
       [(ground [[0 2]]) [[_ ?a]]]
       [(ground [[1 2]]) [[_ ?b]]]
       ])
=> #{} ; WAT?

😮 3
favila22:06:23

I filed a support ticket for this.