My appoligies, this is a mistake I made in the Initial Solution.
The method signature should read:
funcallNonConsecutive(_arr:[Int])->[(Int,Int)]{
(Note the underscore before arr)
This is because the tests expect a function with an un-named argument but the Initial Solution names it arr. I've updated the Kata for future takers's but you'll have to either reset your code or update it yourself.
Edit : Should have replace .components(separatedBy: CharacterSet.decimalDigits.inverted).compactMap{Int($0)}
by .components(separatedBy: " ").compactMap{Int($0)}
Thanks for your quick answer.
Sorry about the wrong place to post, I'm new on the platform, I'll know for the next time :)
I checked what you advice me to do, but those vars contains what I'm expecting: an array of int from what's passed in parameters.
For problems with your code, use Question label, not Issue, that's for problems with the kata itself. Print your vars goodRacesCount and evilRacesCount you'll see the problem.
My appoligies, this is a mistake I made in the Initial Solution.
The method signature should read:
(Note the underscore before
arr
)This is because the tests expect a function with an un-named argument but the Initial Solution names it
arr
. I've updated the Kata for future takers's but you'll have to either reset your code or update it yourself.This comment is hidden because it contains spoiler information about the solution
I can't believe i missed that. Well done !
Edit : Should have replace .components(separatedBy: CharacterSet.decimalDigits.inverted).compactMap{Int($0)}
by .components(separatedBy: " ").compactMap{Int($0)}
Oh ok, I got it now :)
Thanks for your time.
It's not the wrong place, it was the wrong label only ;)
Check what's printed in the second sample test.
Are those the right values?
Thanks for your quick answer.
Sorry about the wrong place to post, I'm new on the platform, I'll know for the next time :)
I checked what you advice me to do, but those vars contains what I'm expecting: an array of int from what's passed in parameters.
For problems with your code, use
Question
label, notIssue
, that's for problems with the kata itself. Print your varsgoodRacesCount
andevilRacesCount
you'll see the problem.This comment is hidden because it contains spoiler information about the solution