the recursive version
Write the recursive version of the function reduce which takes reducer – a two-argument function that reduces elements to a single value s – a sequence of values base – the starting value in the reduction. This is usually the identity of the reducer If you’re feeling stuck, think about the parameters of reduce. from […]