If you know wichs are the primes number, then I don't know is this answer has sense for you.
Thank you for your kind words Zizou.
This platform (Codewars), is incredibly important, I will try to stay here and keep working.
Thanks for the approval.
I added the change.
It turns out that your inputs are not randomized correctly, they have always only 3 elements. You need to replace this line:
let newRandList = [ for i in 1..20 do rand.Next(-100, 100) ] @ [ rand.Next(0, 10); rand.Next(11, 50); rand.Next(51, 100) ]
let newRandList = [ for i in 1..20 do yield rand.Next(-100, 100) ] @ [ rand.Next(0, 10); rand.Next(11, 50); rand.Next(51, 100) ]
Fixed and random tests are now in separate test cases.
Thanks for understanding, yes please delete it, or at least obfuscate it. Because kumite of this type are visible to all, and a valid solution in F# would then be freely available. (!) Meanwhile, to work privately on a possible translation, try this: Kata Translation Editor. You can work with the code without ever actually hitting "save" if you wish. If you get all your testing correct, then you have a publishable translation. I know about random tests in general, but not in F#, so I can't help you there. But good luck!
Then I'll delete it.
Yes of course... I'm just trying to play with the tests to get them to pass in F#... I don't know how to get them to pass for random tests... I could really use some help on it in the mean time I'm just going to keep playing with it to determine how I can get multiple tests to pass for an F# translation.
hi Ze-Marcos, sorry, but what is this? do you want to create an F# translation for the MrZizoScream kata? or are you looking for a hypothetical F# solution to this kata? No offense, but I do not think it's a good idea to post this as a kumite.
I feel like such an idiot... I solved it and then I looked at everybody elses solutions, and I was completely baffaled.
This can be a one liner... You just need that approach...
It's fine, It's probably me confusing some syntax of es6 class and TypeScript.
I do both a lot and sometimes I confuse them.
Either way it's good.
I didn't get notified about your replies, but I see you solved it. I still don't understand, which part of ES6 wasn't working for you?
This was good, and simple...
I did not even consider this approach...
If they gave us some sort of time constraint I was gonna add memoization to this.