the situation depends on the language. in C# and F# at least, the user's solution is required to return a list of int by the type signature, while e.g. Java returns a list of objects. there has likely been some translation drift over time, as this is a very old kata
Hi, I replied to your other comment. I see your logical point, though. Would you like to consider re-writing the description? You could leave that posted with a suggestion flag.
their code filters the list by only allowing numbers
your code filters the list by only not allowing strings
there's no pragmatic difference in this case given the stated input, but to be intentionally pedantic, I will say that if the array happened to contain a 3rd different type, their code would still function properly
the situation depends on the language. in C# and F# at least, the user's solution is required to return a list of
int
by the type signature, while e.g. Java returns a list of objects. there has likely been some translation drift over time, as this is a very old kataHi, I replied to your other comment. I see your logical point, though. Would you like to consider re-writing the description? You could leave that posted with a suggestion flag.
hi, here's my take, hope you don't mind:
there's no pragmatic difference in this case given the stated input, but to be intentionally pedantic, I will say that if the array happened to contain a 3rd different type, their code would still function properly
hope that helps
This comment is hidden because it contains spoiler information about the solution
Not to be pedantic but the instructions are to exclude strings, not include numbers, no?