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.
It's timing me out on the test cases. With a solution that handles them in 0.09s on my machine. In an interpreter. I think codewars needs a break....
The biggest number is around 1000000 which is not that much. My Python solution takes less than 2000 ms on my not very fast computer. It was going faster at Codewars when I validated the kata. Please keep me informed.
There are 21 tests, two with not small numbers but maybe it's a Codewars problem when it's time out, maybe too busy, it happens sometimes:-( You'llhave to try again! I saw solutions not at all optimized that passed! Tell me if that works.
My bad. Is fixed now.
Thank you!
Oh, the examples! Fixed.
I don't see it, could you specify?
I am working on the documentation for Haskell.
Would you be willing to look it over and give me feedback?
@christianhammer, tpatja is not talking about the function parameter, it is about items array which is mutated outside of the function scope. That is a clear side effect, which makes it procedural.
I'm in agreement with you; I think passing back a partitioned array would be significantly closer to ideal here. Note that you asked if we were interested in "higher order functions" in addition to "functional programming", so maybe it would fit better there.
It's a bit on the edge. Passing a function to another function is mainly a "functional programming" paradigm.