Yep, you're right. I designed it so that people both implemented the isPrime function and used it in checkGolbach. And the first tests make sure that the first function works well. Maybe I should have given more freedom to people to choose the way they wanted to determine the primality (like using a sieve or something like that)
I might consider removing the validations for isPrime and let people implement checkGoldbach the way they want, but would need to make sure not to affect the solutions already sent.
The idea is to have the count performed once when setting up the wordCounter, instead of computing that information each time the count method is called.
Guess it's not going to be done anyway. Closing.
Done.
isPrime
is not required anymore to pass the kata. Also random testcases were added.I would consider this correct and desirable, rather than an issue.
Returning a number because you can is not good programming. The result is always a function in x, represented as a string.
Yep, you're right. I designed it so that people both implemented the
isPrime
function and used it incheckGolbach
. And the first tests make sure that the first function works well. Maybe I should have given more freedom to people to choose the way they wanted to determine the primality (like using a sieve or something like that)I might consider removing the validations for
isPrime
and let people implementcheckGoldbach
the way they want, but would need to make sure not to affect the solutions already sent.No feedback. Tests are fine. Closing issue.
This comment is hidden because it contains spoiler information about the solution
The idea is to have the count performed once when setting up the
wordCounter
, instead of computing that information each time thecount
method is called.I'll resolve
I fixed that in the test but with the description you could have guessed, it's in the end notes.
Cannot modify tests after 500+ people have passed
Added test