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.
is it common to mutate function arguments in ruby?
I'm coming from the JS world where immmutability is the key to sanity
EDIT: think i got it - we can sort and reverse in place since chars returns a new array. No args are being mutated
I saw some floats provided, so I chose to reject strings rather than select integers.
Ye the condition already returns true or false
I like it. You could even drop the
? true : false
, right?haha, yeah I always find tons of stuff with my code right after submitting :D
Yes, my bad. Already after I submitted, I realized that this part is redundant, but was to lazy to remove it. Thanks for noticing.
I'd assume that when we remove all the strings, the only things left are the integers.
Internet Archive is online, though.
Used .bytes because ruby-doc.com is offline today and I can't find the right methods :D
why did you add the ? true : false?
This comment is hidden because it contains spoiler information about the solution
Technically wrong, as the specs said: "remove all the strings". The tests are not good enough to catch that though.
This comment is hidden because it contains spoiler information about the solution