Typescript Reduce Initial Value Theorem