Liking cljdoc? Tell your friends :D

naga.util

The ubiquitous utility namespace that every project seems to have

The ubiquitous utility namespace that every project seems to have
raw docstring

c-evalclj/s≠

clj
cljs
(c-eval expr & {:as opts})

Equivalent to clojure.core/eval. Returns nil on error.

Equivalent to clojure.core/eval. Returns nil on error.
source (clj)source (cljs)raw docstring

divide'clj/s

(divide' p s)

Inputs: [p s :- [s/Any]] Returns: [[s/Any] [s/Any]]

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/Any] [s/Any]]

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.
sourceraw docstring

fixpointclj/s

(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.
sourceraw docstring

fn-forclj/s

(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
source (clj)source (cljs)raw docstring

get-fn-referenceclj/s

(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
source (clj)source (cljs)raw docstring

known-namespacescljs

source

mapmapclj/s≠

clj
(mapmap valfn s)
(mapmap keyfn valfn s)
cljs
(mapmap G__5029 G__5030)
(mapmap G__5034 G__5035 G__5036)

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}
sourceraw docstring

raw-lookupcljs

source

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

× close