Reduce is a standard function in Lisp and other functional programming languages. The basic reduce function has two arguments reduce(f,list), where the function f takes two arguments; f is initially applied to the first two elements in the list, then the function is applied again to the result and the third item, and so on. For example:
reduce( '+', (1,2,3,4) ) = (((1+2)+3)+4).
Reduce functions typically allow an optional third argument that is used as an initial value.
reduce( '+', (1,2,3,4) ) = (((1+2)+3)+4).
Reduce functions typically allow an optional third argument that is used as an initial value.
Used in Chap. 8: page 111
Also known as reduce, lisp