Liking cljdoc? Tell your friends :D

Operators

Operators

Operators are a special class of functions that manipulate functions. They differ from other functions in that multiplication of operators is understood as their composition, rather than the product of their values for each input. The prototypical operator is the derivative, D. For an ordinary function, such as sin:

((expt sin 2) x) == (expt (sin x) 2)

but derivative is treated differently:

((expt D 2) f) ==  (D (D f))

New operators can be made by combining others. So, for example, (expt D 2) is an operator, as is (+ (expt D 2) (* 2 D) 3).

We start with a few primitive operators, the total and partial derivatives, which will be explained in detail later.

o/identity

derivative (also named D)

(partial <component-selectors>)

If <O> is an expression representing an operator then

(o/operator? <any>)       ;;=> <boolean>
(kind <O>)                ;;=> :sicmutils.operator/operator

Operators can be added, subtracted, multiplied, and scaled. If they are combined with an object that is not an operator, the non-operator is coerced to an operator that multiplies its input by the non-operator.

The transcendental functions exp, sin, and cos are extended to take operator arguments. The resulting operators are expanded as power series.

this works for almost all of the trigonometric functions. If an operation is implemented for :sicmutils.series/power-series it will work for operators.

Can you improve this documentation?Edit on GitHub

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

× close