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 is an Idiot test, the author checks that you really use recursion or not. This quest is over 7 years old, so forgive him for that
Your function did not recurse enough times - Expected: 4, instead got: 3
Why it's occurs ? My solution is completely written in a recursive way
A recursive function is still recursive even if it's a lambda, so it's perfectly according to specs. This has nothing to do with "bugfix" or anything.
And of course, relying on
Function.prototype.toString
is not the best practice because, you know, you can just obtain the user solution code.Note: this is a bug fixing kata, whose definition is something like "fix bugs" not modify the current function completely which is what you would be doing if you would make it a lambda. I don't believe this is actually an issue... and If relying on
Function.prototype.toString()
is really an issue then you can restore it from a instance instead of using a potentially modified one?Recursion checking code does not work with lambdas.
It also relies on
Function.prototype.toString()
.Note that your code breaks for lambdas.
my code passes 7 tests and fails 1. not sure what the last case is testing, so I don't know how to correct my code.
Well, random tests are in it, so I guess this is resolved? I must say, this is pretty funny :)
Well, I applied your solution, but I'm not entirely sure what it did :D
good. :-)
Well, I think I added random tests, at least I hope these are the kind of tests you expected :D
Hey matt, there are two translations for your very good kata "Large Factorials".
if it enforced the requirement of recursion and some percentage of change being a bug fixing kata then it would probably be unique enough to not be considered a duplicate?
Maybe but you don't almost have anything to change... Recursive factorials are everywhere:-)
I'll do some testing and get back with a solution :)
Loading more items...