Typescript Reduce Sum Python Function Overloading In C