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.
fixed
Rejected.
Too easily cheatable, and use of
Random
instead ofQuickCheck
.Cheatable with
I don't know exactly how you'd prevent that; that's your job.
Use spoiler flag next time please. Your post was visible in the homepage.
This comment is hidden because it contains spoiler information about the solution
New to Haskell, how does this work?
according to
evcxr
, which is a rust REPLWhat happens here if total is 0?
If you could fix assertion messages, this would be approvable.
I'm also seeing changes to the description in the diff, though I'm seeing the same or varying changes throughout this chain of forks, so I'm not sure which of those you actually applied or not. Maybe give those another once over to ensure only necessary changes are made.
The translation it's forked from didn't pass its tests
Also, this would have been a good opportunity to improve the (missing) assertion messages.
EDIT: Disregard my comment about the current solution being correct;
cargo test
uses debug mode, in which case the overflow becomes a runtime error.EDIT 2: Disregard my third point. I hadn't realised this is a new translation, I thought it was an update to an existing translation. There is no current solution...
I don't quite see the point of your fork. From what I can tell, all you did is update the reference solution with one that you would consider "more correct". However
If you can give me a good reason for this fork to exist, I will consider it, otherwise I will simply reject this.
Haskell Translation
Approved.
An annoying but possible solution might be to make a custom int subclass that checks for oversized ints, pass in a RestrictedInt(10) along with n, and disallow integer literals
You'd also have to ban the use of
int
,__class__
,type
, andDecimal
.But that would make it harder than other languages...
Edit: oops; it would still be possible to break the integer restriction using any default method that returns an int
Too much work to replace all the builtins and ban all the importables that would return int...
Loading more items...