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.
Can someone explain what is happening inside "if" statement? after for loop?
Thanks
check mine... it has some regex in it :D
I prefer the way it is, since I want to emphasize the type of the function. (IMO the naming is strange, since it doesn't have to be an operator.) ;)
Thanks for your suggestion. I added a similar test to all 4 languages. :)
No problem, I actually like writing tests. :)
Maybe change this:
into this:
Now this test will tell if stream returns next odd numbers or just one over and over again :)
You mean that it preserves the original elements that satisfy the predicate?
Sorry to hear that. I will add a test. Nevertheless, you might want to write tests on your own (I now, most people hate it). ;)
Doesn't look like regex to me :P
Test for filterS method should also check for monoticty. Lost a lot of time here. Filter can return the same stream all the time (as long as the head passes the condition) and all the tests are green but primes takes ages and never completes. Was really hard to find this bug without debugger.