Clamps Dictionary
integrate
Function
(integrate list &key (modifier #'+) (start (first list)))
Return a running sum (or any other modifier function) of list.
Arguments
list |
List to integrate |
:modifier |
Function to apply to all elements accumulationg the results. |
:start |
Number denoting the start value. |
Examples
(integrate '(0 2 1 4 5)) ; => (0 2 3 7 12) (integrate '(0 2 1 4 5) :start 10) ; => (10 12 13 17 22) (integrate '(1 2 3 2 4) :modifier #'*) ; => (1 2 6 12 48) (integrate '(1 2 3 2 4) :modifier #'*) ; => (1 2 6 12 48)
See also
Created: 2025-02-18 Di 12:58