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.
Interesting solution. Can someone explain how performant this is, i.e. how the short-circuiting here works, i.e. what happens when length of xs is smaller than n?
I already learned through this solution, that pattern matches are allowed to fail in some monads (like list and Maybe) :D
Just do what is fast in your particular language. Order of elements within a combination by definition does not matter.
Which is entirely correct.
This comment is hidden because it contains spoiler information about the solution
The negative number issue is now fixed.
There's still a tab issue I forgot to fix, and it's now fixed.
It's not giving neg numbers. Closed
This issue no longer appears. Closed
same =(
Yeah, I've got exactly the same problem.
This may be fixed by replacing tabs with spaces on line 7 on tests file
I've got exactly the same problem
The following warning prevents me from submitting my otherwise correct solution:
/tmp/haskell116114-18-mo7fqm.mrxlpx2yb9/Main.hs:7:1: Warning:
Tab character
The test case doesn't consider the list has repeated element.
Like this, combinations 2 [1,1,1,1,1].
QuickCheck tests should not give negative numbers for group size (e.g. combinations -2 [1, 2, 3, 4])
Tests expect [[]] when inputting 0, but expect [] when inputting negative values or values greater than the length of the list.
Loading more items...