Beats 99.61% on speed.
Code
# Code
```typescript []
type Fn = (accum: number, curr: number) => number

function reduce(nums: number[], fn: Fn, init: number): number {
    let res: number = init;

    for (let i = 0; i < nums.length; i++) {
        res = fn(res, nums[i])
    }

    return res
};
```
['TypeScript']