Reduce

A function to flatten arrays- ch. 5's Exercise 1.