-
-
Save refset/a7f86c8a3ad34aea5d20eac0b5720a28 to your computer and use it in GitHub Desktop.
inline-eval-pred.clj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn inline-clj-pred [f & args] | |
(apply (eval f) (vec args))) | |
;; testing the pred outside of a query | |
(inline-clj-pred | |
(fn [coll] | |
(map (fn [x] (dissoc x :user)) coll)) | |
#{{:user "ken" :color "red"}}) | |
;; => ({:color "red"}) | |
;; example clause | |
[(foo/inline-clj-pred | |
'(fn [coll] | |
(map (fn [x] (dissoc x :user)) coll)) | |
?input) | |
?output] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment