Fork me on GitHub
#datomic
<
2017-02-05
>
favila14:02:23

@nottmey bindings are only replaced with values at the first level

favila14:02:42

that is why the first works and the second does not, in the first the ?v is nested

favila14:02:14

@nottmey this is a better way: [(namespace ?v) ?v-ns] [(!= ?v-ns "db")]

favila14:02:00

see clojure name and namespace functions, don't use string ops to examine parts of symbols or keywords

nottmey15:02:18

@favila ahh, one needs to leverage the binding nature of datalog, clever. Thanks! I was confused, how you would negate your predicates then... (seems like a common thing) But I found, instead of [(not (predicate ...))], you use (not [(predicate ...)]). Also very handy.

pesterhazy16:02:45

you can also write your own predicate fn and use it using a fully-qualified name

pesterhazy16:02:05

if you need anything more complex