mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-18 12:31:26 +07:00
17 lines
409 B
Python
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
|
|
|
|
|