3 ms·
Technically, Python's reduce function is equivalent to a duck-typed version of Haskell's foldl1' function. It's strict, and it has no starting value argument.
by pjscott 16y ago
Technically, Python's reduce function is equivalent to a duck-typed version of Haskell's foldl1' function. It's strict, and it has no starting value argument.
(Nitpicking forever!)
- rwl 16y agoWell, as long as we're nitpicking... Python's reduce function has an optional starting value argument: http://docs.python.org/library/functions.html#reduce http://docs.python.org/library/functions.html#reduce