Liking cljdoc? Tell your friends :D
Clojure only.

hara.object.query.filter


filter-terms-fnclj

(filter-terms-fn grp)

listing outputs based upon different predicate conditions

((filter-terms-fn {:name ["a"]}) [{:name "a"} {:name "b"}]) => [{:name "a"}]

((filter-terms-fn {:predicate [(fn [x] (= "a" (:name x)))]}) [{:name "a"} {:name "b"}]) => [{:name "a"}]

((filter-terms-fn {:origins [#{:a :b}]}) [{:origins #{:a}} {:origins #{:c}}]) => [{:origins #{:a}}]

((filter-terms-fn {:modifiers [:a]}) [{:modifiers #{:a}} {:modifiers #{:c}}]) => [{:modifiers #{:a}}]

listing outputs based upon different predicate conditions

((filter-terms-fn {:name ["a"]})
 [{:name "a"} {:name "b"}])
=> [{:name "a"}]

((filter-terms-fn {:predicate [(fn [x] (= "a" (:name x)))]})
 [{:name "a"} {:name "b"}])
=> [{:name "a"}]

((filter-terms-fn {:origins [#{:a :b}]})
 [{:origins #{:a}} {:origins #{:c}}])
=> [{:origins #{:a}}]

((filter-terms-fn {:modifiers [:a]})
 [{:modifiers #{:a}} {:modifiers #{:c}}])
=> [{:modifiers #{:a}}]
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close