Liking cljdoc? Tell your friends :D

sicmutils.function


arg-scaleclj/s

(arg-scale f & factors)

Takes a function f and a sequence of factors, and returns a new function that multiplies each factor by the corresponding argument of f. Too many or two few factors are ignored.

((arg-scale square 3) 4) ==> 144 ((arg-scale square 3 2 1) 4) ==> 144

Takes a function `f` and a sequence of `factors`, and returns a new function
that multiplies each factor by the corresponding argument of `f`. Too many or
two few factors are ignored.

((arg-scale square 3) 4) ==> 144
((arg-scale square 3 2 1) 4) ==> 144
raw docstring

arg-shiftclj/s

(arg-shift f & shifts)

Takes a function f and a sequence of shifts, and returns a new function that adds each shift to the corresponding argument of f. Too many or two few shifts are ignored.

((arg-shift square 3) 4) ==> 49 ((arg-shift square 3 2 1) 4) ==> 49

Takes a function `f` and a sequence of `shifts`, and returns a new function
that adds each shift to the corresponding argument of `f`. Too many or two few
shifts are ignored.

((arg-shift square 3) 4) ==> 49
((arg-shift square 3 2 1) 4) ==> 49
raw docstring

arityclj/s

(arity f)

Return the cached or obvious arity of the object if we know it. Otherwise delegate to the heavy duty reflection, if we have to.

Return the cached or obvious arity of the object if we know it.
Otherwise delegate to the heavy duty reflection, if we have to.
raw docstring

composeclj/s

(compose & fns)

Compose is like Clojure's standard comp, but for this system we like to know the arity of our functions, so that we can calculate their derivatives with structure, etc. The arity of a composition is simply the arity of its rightmost (that is, first to be applied) function term.

Compose is like Clojure's standard comp, but for this system we
like to know the arity of our functions, so that we can calculate
their derivatives with structure, etc. The arity of a composition is
simply the arity of its rightmost (that is, first to be applied)
function term.
raw docstring

exposed-aritiescljs

(exposed-arities f)

When CLJS functions have different arities, the function is represented as a js object with each arity storied under its own key.

When CLJS functions have different arities, the function is represented as a js
object with each arity storied under its own key.
raw docstring

joint-arityclj/s

(joint-arity arities)

Find the most relaxed possible statement of the joint arity of the given arities. If they are incompatible, an exception is thrown.

Find the most relaxed possible statement of the joint arity of the given arities.
If they are incompatible, an exception is thrown.
raw docstring

js-aritycljs

(js-arity f)

Returns a data structure indicating the arity of the supplied function.

Returns a data structure indicating the arity of the supplied function.
raw docstring

jvm-arityclj

(jvm-arity f)

variadic?cljs

(variadic? f)

Returns true if the supplied function is variadic, false otherwise.

Returns true if the supplied function is variadic, false otherwise.
raw docstring

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

× close