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
thats really clever! thanks
Wasn't expecting this but wow
Great use of this property!
That's impressive, I often forget that there probably is some hidden pattern that I can leverage. Good one :).
I don't think
((>1) . length)
is optimised away; that's just too much to ask. I did some testing once, though it may have been the testing itself that forced theO(n)
. Profiling is still beyond me.It may not matter for the overall complexity in this case, but you're doing something in
O(n)
which could have been done inO(1)
( or maybeO(log n)
), which is generally a useful optimisation; those are always good to keep a sharp eye out for.If @bkaest does it with
not.null.tail
, that's probably better. :P It may still be a micro-optimisation, that's certainly true.Sure, but I don't know how many intermediate lists are left after optimization, so from my point of view it's adding 1 list (assuming it's not optimized away; IDK how advanced optimizations are) to an unknown number of lists keeping the asymptotic coplexity, so it can go either way.
Walking every group entirely (
length
) when all you're interested in is the second:
constructor is not a Best Practice.Composable streaming folds
Elegant.
This comment is hidden because it contains spoiler information about the solution
Haha, very nice!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...