Pregunta de entrevista de Visa Inc.

Write a reduce function, both with and without recursion.