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.
After trying to find patterns in binary I've hacked the tests in javascript and after I saw what real solutions look like I'm glad I did it - because otherwise I'd go crazy :)
Thanks to solutions and discussions I'm now exploring DFA which is a totally new thing for me and I still have no clue how do you build one with RegExp but I'm excited to learn that!
Should probably buy that book you mentioned too :)
This comment is hidden because it contains spoiler information about the solution
Wow. Just wow.
My initial attempt didn't even passed first random test, so after some good thought and optimisation I've managed to beat it, even passed 2 random tests before timeout, but got stuck on third. Then, out of curiosity I've tried to run random test with dummy function, just to know how much tests are there, was pretty sure third would be the last one, but just in case... So after I've picked up my jaw from chair, and seeing that just test code was eating about 8 seconds from 12, I was pretty sure that test case is bugged, glad I've checked discussions. Now I slowly realise the amount of optimisation required, the whole approach must be wrong, though got a hint from post down here - accesing object properties is slow, hmm... Got to think now...
As far as i see it won't work on chained calls like "curriedFunc(10)(20)(30)", but the trick with reseting args through finally is cool idea!