Through exercise 2.39
Updated somethings to use not seq instead of empty?