added implementation of List.last using reverse, foldLeft, foldRight and direct access to nth element