Updates Haskell Problem 1 Solution for reusability