Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
@Voila your answer doesn't help with anything
There are both tests with
Int
andInteger
. Declare the function type so that it can work with either or just don't declare the type.I experienced this as well
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.
Read the error carefully:
Your function's type signature is
[Integer]
, but it should actually be[Int]
.This comment is hidden because it contains spoiler information about the solution