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.
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.
This comment is hidden because it contains spoiler information about the solution
What is your point exactly, did the chicken lay an egg or the egg produce a chicken?
I asked chatGPT to solve this kata, and this function with regular expression is the answer.
This comment is hidden because it contains spoiler information about the solution
Loading more items...