(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
(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
(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.
(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.
(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.
(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.
(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.
(jvm-arity f)
(variadic? f)
Returns true if the supplied function is variadic, false otherwise.
Returns true if the supplied function is variadic, false otherwise.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close