Clamps Dictionary
integrate
Function
(integrate seq &key (modifier #'+) (start (elt seq 0)))
Return a running sum (or any other modifier function) of seq.
Arguments
seq |
Proper sequence 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-06-08 So 16:56