Finished Problems 36 and 37 (Haskell)