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.
How did you get the Kata to let you use "Math"
When I tried that it said that "Math does not exist in the current context"
2nd Time I Got Top answer, lets go
read the assertion message, not the line of code:
why the test
do_test("", "ac", "ab", false)
return false :) isn't the part1 contain "" in its?God i love haskell
when you want to solve a problem, better way is using the fundamentals of the language not the built-in function.
generic, works for lists and for strings (and probably iterables in general)
This comment is hidden because it contains spoiler information about the solution
That rocks. The lookahead and keeping matches techniques are essentials.
Classes are just syntactic sugar meant to encapsulate code and abstract(hiding unnecessary details) code. The code would still work in this case without classes and by simply just writing the function
I definitely prefer readability, lol. I remember when I was starting out and hooked on code golf.
Nice parser
/1 refers to the first matching group in regexp (so literally the pattern is that the same letter should occur twice in a row)
Yes Of Course it can simply work without classes. Just write the function outside of the class code block literal and invoke the function like this: findSmallestInt([23, 45, 67])
it's not a completely ridiculous solution though.
Loading more items...