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.
__str__
,__len__
, and__getitem__
should be implemented instead ofto_string
,size
, andget
test.expect
with a useless error messageinitial_value
inreduce
to0
by default shouldn't pass"["
and"]"
ban can be worked around easilydeque
I happen to like the approach you've taken. But it's still a duplicate, and I'm conflicted if your approach is sufficient excuse for that.
In this case, it's a duplicate of a 7 kyu kata. It might be better to steal a 5 or 4 kyu one for it. ( I'd like to see that done actually. It may go over better than this one. )
I implemented
squareRoot
asMath.sqrt
. If you're going to have us implement umpteen components, and test all those components, you could have taken the time to disable that. ( Note that I am not a fan of disabling things. Mostly it means solvers are doing busywork. Here, we explicitly are. )Also, if you're going to have us implement all those components, check that the composition works. Compose them yourself, and test that composition. Do not fully rely on the user solution.
You're reimplementing assert.approximately. Well, that fits right in with the kata as a whole. :P
square
- built inaverage
- turn math function into a programabs
- built inimprove
- turn math function into a programgood-enough?
andtry
- basically the same as this katasqrt
- built inNone of the individual tasks are meaningful/new, and throwing them all into 1 kata doesn't make it any good.
https://www.codewars.com/kata/reviews/5e2401f1f6a4500001b667f2/groups/5e241da5ceed8c0001fe14d2
Only individual functions are tested, so that solution doesn't really do the whole thing and it passes the tests.
Haskell translation