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.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I have a solution that works in LinqPad but causes an excption when tested in CodeWars. As an F# beginner I don't know whether it is something I'm doing or something broken in the F# test harnest.
at Microsoft.FSharp.Collections.SeqModule.Item[T] (System.Int32 index, System.Collections.Generic.IEnumerable
1[T] source) [0x00030] in <55c32c755d9f56a7a7450383752cc355>:0 at FSI_0002.howMuchILoveYou (System.Int32 nbPetals) [0x00053] in <dd96d4ac9a8b4cd4bab8d00ce83f887c>:0 at FSI_0002+Tests+suite@12.Invoke (Microsoft.FSharp.Core.Unit _arg1) [0x00035] in <dd96d4ac9a8b4cd4bab8d00ce83f887c>:0 at Fuchu.Impl+evalTestList@260-1.Invoke (System.Tuple
2[T1,T2] tupledArg) [0x00028] in <56a815db36d21f70a7450383db15a856>:0This comment is hidden because it contains spoiler information about the solution
Hmmm, this would fail if the smallest number was repeated more than once in the list. An additional twist on this implementation would also be to use the Enumerable.Except method/operator.