(first-terms-fn grp)creates a function that returns the first element of the list
((order/first-terms-fn {:first true}) [1 2 3]) => 1
creates a function that returns the first element of the list
((order/first-terms-fn {:first true}) [1 2 3])
=> 1(merge-terms-fn grp)creates a function that returns the first element of the list
(-> (query/query-class (type []) ["create"]) ((order/merge-terms-fn {:merge true}))) ;;=> #[create :: ([java.util.List]), ([clojure.lang.ISeq]), ;; ([clojure.lang.IReduceInit]), ([java.lang.Object[]]), ;; ([java.lang.Iterable])]
creates a function that returns the first element of the list
(-> (query/query-class (type []) ["create"])
((order/merge-terms-fn {:merge true})))
;;=> #[create :: ([java.util.List]), ([clojure.lang.ISeq]),
;; ([clojure.lang.IReduceInit]), ([java.lang.Object[]]),
;; ([java.lang.Iterable])](order grp eles)formats an output for
(->> (query/query-class (type []) ["create"]) (order/order {:select-terms [:params]})) ;;=> ([java.util.List] [clojure.lang.ISeq] ;; [clojure.lang.IReduceInit] [[Ljava.lang.Object;] ;; [java.lang.Iterable])
formats an output for
(->> (query/query-class (type []) ["create"])
(order/order {:select-terms [:params]}))
;;=> ([java.util.List] [clojure.lang.ISeq]
;; [clojure.lang.IReduceInit] [[Ljava.lang.Object;]
;; [java.lang.Iterable])(select-terms-fn grp)creates a function that selects terms to output
(-> (query/query-class (type []) ["create"]) ((order/select-terms-fn {:select-terms [:name]}))) => ["create"]
creates a function that selects terms to output
(-> (query/query-class (type []) ["create"])
((order/select-terms-fn {:select-terms [:name]})))
=> ["create"](sort-fn f)returns a function taking two inputs x and y, comparing the outputs after applying f to both
((order/sort-fn :id) {:id 1} {:id 2}) => -1
returns a function taking two inputs `x` and `y`, comparing the outputs after applying `f` to both
((order/sort-fn :id) {:id 1} {:id 2}) => -1(sort-terms-fn grp)This is a little broken, it is supposed to sort on various keys, but currently only works with :name
((order/sort-terms-fn {:sort-terms nil}) [{:name 3} {:name 1} {:name 2}]) => [{:name 1} {:name 2} {:name 3}]
This is a little broken, it is supposed to sort on various keys, but currently only works with :name
((order/sort-terms-fn {:sort-terms nil})
[{:name 3} {:name 1} {:name 2}])
=> [{:name 1} {:name 2} {:name 3}]cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |