Exercises from Chapter 4.
Renamed isNil() and nil() to isEmpty() and empty().
More exercises from Chapter 4.