The ubiquitous utility namespace that every project seems to have
The ubiquitous utility namespace that every project seems to have
(c-eval expr & {:as opts})
Equivalent to clojure.core/eval. Returns nil on error.
Equivalent to clojure.core/eval. Returns nil on error.
(divide' p s)
Inputs: [p s :- [s/Any]] Returns: [(s/one [s/Any] "true values") (s/one [s/Any] "false values")]
Takes a predicate and a sequence and returns 2 sequences. The first is where the predicate returns true, and the second is where the predicate returns false. Note that a nil value will not be returned in either sequence, regardless of the value returned by the predicate.
Inputs: [p s :- [s/Any]] Returns: [(s/one [s/Any] "true values") (s/one [s/Any] "false values")] Takes a predicate and a sequence and returns 2 sequences. The first is where the predicate returns true, and the second is where the predicate returns false. Note that a nil value will not be returned in either sequence, regardless of the value returned by the predicate.
(fixpoint f a)
Applies the function f to the value a. The function is then, and applied to the result, over and over, until the result does not change. Returns the final result. Note: If the function has no fixpoint, then runs forever.
Applies the function f to the value a. The function is then, and applied to the result, over and over, until the result does not change. Returns the final result. Note: If the function has no fixpoint, then runs forever.
(fn-for op)
Converts a symbol or string representing an operation into a callable function
Converts a symbol or string representing an operation into a callable function
(get-fn-reference kw)
Inputs: [kw :- (s/cond-pre s/Keyword s/Symbol)] Returns: (s/maybe Var)
Looks up a namespace:name function represented in a keyword, and if it exists, return it. Otherwise nil
Inputs: [kw :- (s/cond-pre s/Keyword s/Symbol)] Returns: (s/maybe Var) Looks up a namespace:name function represented in a keyword, and if it exists, return it. Otherwise nil
(mapmap valfn s)
(mapmap keyfn valfn s)
(mapmap G__6841 G__6842)
(mapmap G__6846 G__6847 G__6848)
Inputs: ([valfn :- (=> s/Any s/Any) s :- [s/Any]] [keyfn :- (=> s/Any s/Any) valfn :- (=> s/Any s/Any) s :- [s/Any]]) Returns: #:s{Any s/Any}
Creates a map from functions applied to a seq. (mapmap (partial * 2) [1 2 3 4 5]) => {1 2, 2 4, 3 6, 4 8, 5 10} (mapmap #(keyword (str "k" (dec %))) (partial * 3) [1 2 3]) => {:k0 3, :k1 6, :k2 9}
Inputs: ([valfn :- (=> s/Any s/Any) s :- [s/Any]] [keyfn :- (=> s/Any s/Any) valfn :- (=> s/Any s/Any) s :- [s/Any]]) Returns: #:s{Any s/Any} Creates a map from functions applied to a seq. (mapmap (partial * 2) [1 2 3 4 5]) => {1 2, 2 4, 3 6, 4 8, 5 10} (mapmap #(keyword (str "k" (dec %))) (partial * 3) [1 2 3]) => {:k0 3, :k1 6, :k2 9}
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close