Ad
  • Custom User Avatar

    +1 for changing output type to Integer.

    I've cheated here writing actual hamming signature as Int -> Integer and it passed all tests anyway so there are no overflows in the testing environment. But the Haskell translation of the kata should be definitely changed because Haskell standard guarantees only that Int values are at least in [-2^29 ... 2^29-1] and hamming 5000 is greater that 2^45.

  • Default User Avatar

    Please change the Haskell signature from Int to Integer
    Even if the numbers (barely) fit in the type, if you calculate a few more you will overflow, which might be part of your algorithm. Then you will have to deal with casting to fix this.