Part of SF patch #1513870 (the still relevant part) -- add reduce() to
functools, and adjust docs etc.
diff --git a/Doc/lib/libfunctools.tex b/Doc/lib/libfunctools.tex
index 33a6f52..034143a 100644
--- a/Doc/lib/libfunctools.tex
+++ b/Doc/lib/libfunctools.tex
@@ -51,6 +51,19 @@
   \end{verbatim}
 \end{funcdesc}
 
+\begin{funcdesc}{reduce}{function, sequence\optional{, initializer}}
+  Apply \var{function} of two arguments cumulatively to the items of
+  \var{sequence}, from left to right, so as to reduce the sequence to
+  a single value.  For example, \code{reduce(lambda x, y: x+y, [1, 2,
+  3, 4, 5])} calculates \code{((((1+2)+3)+4)+5)}.  The left argument,
+  \var{x}, is the accumulated value and the right argument, \var{y},
+  is the update value from the \var{sequence}.  If the optional
+  \var{initializer} is present, it is placed before the items of the
+  sequence in the calculation, and serves as a default when the
+  sequence is empty.  If \var{initializer} is not given and
+  \var{sequence} contains only one item, the first item is returned.
+\end{funcdesc}
+
 \begin{funcdesc}{update_wrapper}
 {wrapper, wrapped\optional{, assigned}\optional{, updated}}
 Update a wrapper function to look like the wrapped function. The optional