Files
openide/python/helpers/python-skeletons/functools.py
2014-10-07 17:22:23 +04:00

17 lines
409 B
Python

"""Skeleton for 'functools' stdlib module."""
def reduce(function, sequence, initial=None):
"""Apply a function of two arguments cumulatively to the items of a
sequence, from left to right, so as to reduce the sequence to a single
value.
:type function: collections.Callable
:type sequence: collections.Iterable
:type initial: T
:rtype: T | unknown
"""
return initial