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.
This comment has been reported as abusive
Fixed. Thanks!
https://www.codewars.com/kata/reviews/525481903700c1a1ff0000e4/groups/5b12959dfe77c3f8fb000200
JSON.stringify
is not welcomed here :-)OK. Need more tests with arrays
This comment is hidden because it contains spoiler information about the solution
I just check the case when a function has an arbitrary number of arguments.
sumArgs(1)
should be cached as well assumArgs(1,2)
or evensumArgs()
Hi! I believe my kata has more strict requirements regarding function arguments and time complexity. Give me a chance :-)
Hi. The problem with this solution is that if an original object has the
meh
property we erase it.I tried to identify this problem using
Proxy
. But since your property was added byObject.defineProperty
my own test fails. Need to improve tests. Thanks for the case.Wow
Seems like the idea to remove properties in
it
worked. I'll try to republish kata.I'm glad I didn't have to wrap
call
and count calls because you kinda needcall
itself to wrap something.Fixed
No idea how to resist this :-(
The problem is that I can't delete these properties from
Function.prototype
. The test framefork uses them.Now updated tests invalidated your initial solution.
Thanks for the help!
setTimeout
worked well. Thanks!Good point!
I thought that a test passes only when
done
is called, otherwise the test runner has a timeout after which tests fail. And based on the dfhwze's solution I was wrong.Loading more items...