UVA haskell lecture 8 homework