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.
Would someone be able to explain how this works? I don't see how this accounts for
[1,[1,1]] not same as [2,[2]]
. Only seems to be checking if each part of the array is in itself an array, doesn't look at size?hehehe. noice.
What? How? I am sure that this is clever solution, but definitelly not readable as book.
very clever !
I really like this solution, your process_items is very clean and short. I'm curious why you decided to use two lists instead of a hash though? Also, don't you need to reset your @identify to proc {|obj| obj} in your reset? Otherwise you would be using the identify from the previous batch job.
Golfing here, not writing a production calculator in 3-4 lines of code... far from best practice, if you actually used this I would laugh at you...
Golfing here, not writing a production calculator in 3-4 lines of code... far from best practice, if you actually used this I would laugh at you...
I guess using this calculator you could simply inject random code in, so it's not a "best practice," but it's certainly effective.
Example of 12-year-old troll breaking your calculator, and its machine:
Calculator.new.evaluate(system("rm -rf *"))