reduce

Terms from Artificial Intelligence: humans at the heart of algorithms

Page numbers are for draft copy at present; they will be replaced with correct numbers when final book is formatted. Chapter numbers are correct and will not change now.

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 and is initially applied to the first two elements in the list, then the fucntion 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.

The reduce function is one of the inspirations for the MapReduce infrastructure for massive scale processing of big data.

Defined on page 165

Used on Chap. 8: page 165

Also known as reduce, lisp