Fork me on GitHub
#core-logic
<
2022-04-27
>
wontheone118:04:03

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

erwinrooijakkers07:06:17

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