Improved solution to Ex 7

The check for empty list was unnecessary, because `foldl` gives that implicitly.