Skip to content

Instantly share code, notes, and snippets.

@swannodette
Created November 28, 2012 23:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save swannodette/4165678 to your computer and use it in GitHub Desktop.
Save swannodette/4165678 to your computer and use it in GitHub Desktop.
not-pathc.clj
(defc not-pathc [x path]
(= (get-in x path ::not-found) ::not-found))
(run* [q]
(fresh [x]
(== {:a {:b x}} q)
(not-pathc x [:a :b])))
;; => (({:a {:b _.0}} :- (not-pathc (_.0 [:a :b]))))
@hugoduncan
Copy link

@swannodette Thanks! this helped -- I found I had an error in my lvars. not-pathc via defc seems to be working well :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment