core-logic

wontheone1 2022-04-27T18:43:03.600459Z

Hello! is there a negative of membero ? like it succeeds when x is not a member of l.

wontheone1 2022-04-27T18:43:19.588729Z

https://clojuredocs.org/clojure.core.logic/membero Membero FYI

erwinrooijakkers 2022-06-01T07:59:17.766309Z

https://stackoverflow.com/a/16371536/2609980an implementation:

(defne nonmembero
  "A relation where l is a collection, such that l does not contain x"
  [x l]
  ([_ ()])
  ([_ [head . tail]]
     (!= x head)
     (nonmembero x tail)))

💯 1
wontheone1 2022-06-01T12:03:01.255469Z

Thanks!