(aggregate-keys-by-values m)
From a map of key with value a vector of values, aggregate the key by the values found in the vector.
(aggregate-keys-by-values {:k1 [:v1 :v2 :v3] :k2 [:v2] :k3 [:v1 :v2 :v3]})
=> {:v1 [:k1 :k3] :v2 [:k1 :k2 :k3] :v3 [:k1 :k3]}
From a map of key with value a vector of values, aggregate the key by the values found in the vector. `(aggregate-keys-by-values {:k1 [:v1 :v2 :v3] :k2 [:v2] :k3 [:v1 :v2 :v3]})` => `{:v1 [:k1 :k3] :v2 [:k1 :k2 :k3] :v3 [:k1 :k3]}`
(associate-by f coll)
takes a vector of map and group all the map by the key in it that should be unique
takes a vector of map and group all the map by the key in it that should be unique
(hint-typed-doto type x & forms)
Evaluates x then calls all of the methods and functions with the value of x supplied at the front of the given arguments. The forms are evaluated in order. Returns x. (doto (new java.util.HashMap) (.put "a" 1) (.put "b" 2))
Evaluates x then calls all of the methods and functions with the value of x supplied at the front of the given arguments. The forms are evaluated in order. Returns x. (doto (new java.util.HashMap) (.put "a" 1) (.put "b" 2))
(list-files dir)
(list-files dir pred)
return a seq of File object given a directory and an optional predicate (see parse-path fn that can help to write the predicate)
return a seq of File object given a directory and an optional predicate (see parse-path fn that can help to write the predicate)
(ns-clean)
(ns-clean ns)
Remove all internal mappings from a given name space or the current one if no parameter given.
Remove all internal mappings from a given name space or the current one if no parameter given.
(parse-path f)
Given a file return a map with following keys: dir root base name ext, nil if file doesn't exist
Given a file return a map with following keys: dir root base name ext, nil if file doesn't exist
(server-listening? host port)
(server-listening? host port timeout-ms)
Check if a given host is listening on a given port in the limit of timeout-ms (default 500 ms)
Check if a given host is listening on a given port in the limit of timeout-ms (default 500 ms)
(set-attributes representation attributes)
call setAttributes(Map<String,String>) method on representation object with a clojure map
call setAttributes(Map<String,String>) method on representation object with a clojure map
(setters m type)
Given a compile-time literal map of attributes and values, return a function that calls the corresponding setters on some java object.
Given a compile-time literal map of attributes and values, return a function that calls the corresponding setters on some java object.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close