Add Structures and reverse with basic functional programming