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.
Its all about closures. Different complexFunctions has its own calls variable becouse of closure enviroment.
You need to copy the array if you use push/shift cause its seems to be global variable.
GJ then, hope it'll help some1 else :)
[HINT] Imagne that you have a queue of 5 people. Everytime someone buys a drink he clone himself and they (he himself, and his clone) move to the back of the queue. So for instance after 3rd people took the drink queue looks like this:
initial state [x,y,z,a,b] => x takes the drink => [y, z, a, b, x, x] - note that last index is in real life last guy in queue => y takes the drink => [z, a, b, x, x, y, y] => one eternity later and suddenly you have a queue looking like this [x.... x^n, y.... y^n and so on] so that basically means that x-ish would be taking drinks for another eternity cloning himself each time.
I know that this kata is a little stupid cause how the heck people can clone :D
Master of Regexp
We've got a badass developer over here
Wow, that's some clever code Sensei madstorm