datomic

Ask questions on the official Q&A site at https://ask.datomic.com!
favila 2021-06-09T17:03:56.180100Z

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?

1😮
favila 2021-06-10T22:02:23.190300Z

I filed a support ticket for this.

favila 2021-06-10T22:02:38.190600Z

#3163