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.
Correct: I could have put
{2,}
, but why bother my keyboard with unnecessary extra work :p?yes,
{2}
is all you need to know the characters won't be alternating vowel/consonant.Oh, good point: I didn't know about
!~
in Ruby (or maybe I just forgot it, ops :D), thanks for the feed :)wow nice! this is way better (and shorter) than my original regexp solution. that was a smart idea to scan for invalid patterns rather than valid patterns like I did. you inspired me to make a new solution based on yours, but using the
!~
method, hope you don't mind!Of course it does: match of the first alternative in the regex :)
Does this work for "aaa" (should be false)?
257ms
None of them?
I wrote this kata more than a year ago when I was first learning angular, which has this hackery built-in and center-place.
Now it's the future and I reject the idea that's it's good to use this crazy trick for anything.
Production code should be short, easy to read, and boring, like a Malcolm Gladwell novel. Not like this.
This comment is hidden because it contains spoiler information about the solution
You might consider involving .toString() somehow (like I mention in the hint)
Nice, thank you.
I'm stuck though because the defaulted function I built doesn't excpect any particluar arguments.
Using eval I could write the defaulted function with the parametersignature of the original, but that wouldn't be right, would it? :)
How did you determine the arguments to the original argument in the first place?
What can you so that will work again?
This comment is hidden because it contains spoiler information about the solution
you don't need to have that extra index variable, since you can just have the index be the second argument you receive of the 'for' (for line, index in field)