exercises up to and including 3.12 which writes a list reverse function using foldLeft