Answers for "paco reduce"

1

paco reduce

async def reducer(acc, num):
   return acc + num

await paco.reduce(reducer, [1, 2, 3, 4, 5], initializer=0)
# => 15
Posted by: Guest on June-26-2020
0

paco reduce

import paco

async def reducer(acc, num):
   return acc + num

await paco.reduce(reducer, [1, 2, 3, 4, 5], initializer=0)
# => 15
Posted by: Guest on June-30-2020

Browse Popular Code Answers by Language