Ad
  • Custom User Avatar

    @Voila your answer doesn't help with anything

  • Default User Avatar

    There are both tests with Int and Integer. Declare the function type so that it can work with either or just don't declare the type.

  • Custom User Avatar

    I experienced this as well

  • Custom User Avatar

    I don't think that's the case. When I changed the type decleration to [Int] -> String I still got an error:

    /tmp/haskell11799-5-qnsh3p.q8iz1if6r/Test/OddOrEven.hs:30:21:
    Couldn't match type Integer' with Int'
    Expected type: [Int]
    Actual type: [Integer]
    In the first argument of oddOrEven', namely a'
    In the first argument of shouldBe', namely oddOrEven a'

    I think there's a deeper problem with the tests for this kata.

  • Custom User Avatar

    Read the error carefully:

    Couldn't match type Int with Integer
    Expected type: [Integer]
    Actual type: [Int]

    Your function's type signature is [Integer], but it should actually be [Int].

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution