Fix base case for mods
Challenge6 in Haskell