Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

funtools rougly equivalent to, internal

def reduce(function, iterable, initializer=None):
    it = iter(iterable)
    if initializer is None:
        value = next(it)
    else:
        value = initializer
    for element in it:
        value = function(value, element)
    return value
Source by docs.python.org #
 
PREVIOUS NEXT
Tagged: #funtools #rougly #equivalent #internal
ADD COMMENT
Topic
Name
6+4 =