Moved reduce() skeleton from builtins to functools for Python 3