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.
Done!
Fixed, thanks for letting me know!
I created a Rust translation, please take a look!
Ah, that's a good point, thanks! I'm too lazy to update the solution though :P
I made a Rust translation, please take a look!
True. Although probably not important for the 8th kyu. Thanks :)
Thanks! Sadly it means I won't get credited for doing the translation :(
I can't copy-paste that because it doesn't have the markup. You have to put it inside ``` blocks if you want me to copy-paste it.
Also, I don't see a difference between this description and the one I have here. You sure you're looking at the correct page?
As an alternative, you can reject my current translation, and I'll make a new one which will automatically copy the current description.
Sure! I updated the description.
Done, please approve this one. (The old code works fine with Rust 1.50, but I had to change it anyway since CodeWars won't let me submit anything without changing it.)
Thank you for the feedback! I made the requested change.
Yeah, probably not worth the effort. Can I rescind the translation somehow?
As far as I understand, this was done to avoid exposing
rand
's types inquickcheck
's API. I think that can be fixed inquickcheck
itself. People are already clamoring for this, so I expect it'll be done eventualy.Thanks for approving the translation!
Thanks! I updated my translation.
Nice! I adopted it here.
I prefer QuickCheck because when a test fails, QuickCheck narrows it down to the smallest inputs that still produce a failure. This helps when you can't quite figure out the problem: QuickCheck's failures nudge you towards the solution. With "rand in a loop" approach you're at the mercy of the RNG: sometimes the tests will give you hints, and sometimes they won't.
quickcheck::Gen
is an extension overRng
, so I could usegen_range()
with it too.However,
float_eq
made me upgrade this kata to Rust 1.50, which brought in quickcheck-1.x.y, whereGen
is no longer derived fromRng
:( So I went with your suggestion instead.And yeah, I didn't think what'll happen if the values are too large. Thanks for pointing that out!
I keep them in case people aren't familiar with Rust testing. I'll probably stop doing that in more advanced katas, where we can assume that people can code in Rust already.
I translated this to Rust, please take a look!
Loading more items...