Clamps Dictionary
differentiate
Function
(differentiate list &key (modifier #'-) (start (first list)))
Return differences or the results of applying modifier to subsequent elements of list.
Arguments
list |
List to integrate |
:modifier |
Function to apply to all elements accumulationg the results. |
:start |
Number denoting the start value. |
Examples
(differentiate '(0 2 3 7 12)) ; => (0 2 1 4 5) (differentiate '(0 2 3 7 12) :start 3) ; => (3 2 1 4 5) (differentiate '(1 2 6 12 48) :modifier #'/) ; => (1 2 3 2 4) (differentiate (integrate '(17 2 4))) ; => (17 2 4)
See also
Created: 2025-02-18 Di 12:58