Ad
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    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.IEnumerable1[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.Tuple2[T1,T2] tupledArg) [0x00028] in <56a815db36d21f70a7450383db15a856>:0

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    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.