[haskell] solution with no regex's yay!