

def test_reduce(self):
    res = _([1, 2, 3, 4, 5, 6]).reduce((lambda sum, num, *args: (sum + num)), 0)
    self.assertEqual(21, args, 'did not reduced correctly')
    res = _([1, 2, 3, 4, 5, 6]).foldl((lambda sum, num, *args: (sum + num)), 0)
    self.assertEqual(21, res, 'did not foldl correctly')
    res = _([1, 2, 3, 4, 5, 6]).inject((lambda sum, num, *args: (sum + num)), 0)
    self.assertEqual(21, res, 'did not inject correctly')

dataset/ETHPy150Open serkanyersen/underscore.py/tests/test_collections.py TestCollections.test_reduce/VarMisuse@56/59 `res`->`args`