Added tests for foldRight and catching errors for a P1