Added map function to reverse()