Ad
  • Custom User Avatar

    Hold on, the range is always ascending

  • Custom User Avatar
  • Custom User Avatar

    Updated, the output type is a record now

  • Custom User Avatar

    Is -- (black, white) enough, or should I change the output type to a two field record?

  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

    Haskell translation
    and F# translation, while I'm at it

  • Custom User Avatar

    The second first is empty while the second contains a space

  • Default User Avatar

    F# version seems to be broken. Sample tests work fine, but when attempting – no matter the solution used – I get this exception

    System.NotSupportedException: Specified method is not supported.
    System.NotSupportedException: Specified method is not supported.
      at System.Reflection.MonoGenericClass.GetMethods (System.Reflection.BindingFlags bf) [0x00000] in <f712f98eb8e445c8918edaf595bbe465>:0 
      at System.Reflection.Emit.TypeBuilder.GetMethodsByName (System.String name, System.Reflection.BindingFlags bindingAttr, System.Boolean ignoreCase, System.Type reflected_type) [0x00019] in <f712f98eb8e445c8918edaf595bbe465>:0 
      at System.Reflection.Emit.TypeBuilder.GetMethods (System.Reflection.BindingFlags bindingAttr) [0x00000] in <f712f98eb8e445c8918edaf595bbe465>:0 
      at System.Diagnostics.StackTrace.GetFullNameForStackTrace (System.Text.StringBuilder sb, System.Reflection.MethodBase mi) [0x00024] in <f712f98eb8e445c8918edaf595bbe465>:0 
      at System.Diagnostics.StackTrace.AddFrames (System.Text.StringBuilder sb) [0x000d9] in <f712f98eb8e445c8918edaf595bbe465>:0 
      at System.Diagnostics.StackTrace.ToString () [0x00065] in <f712f98eb8e445c8918edaf595bbe465>:0 
      at System.Diagnostics.StackTrace.ToString (System.Diagnostics.StackTrace+TraceFormat traceFormat) [0x00000] in <f712f98eb8e445c8918edaf595bbe465>:0 
      at System.Environment.GetStackTrace (System.Exception e, System.Boolean needFileInfo) [0x0001a] in <f712f98eb8e445c8918edaf595bbe465>:0 
      at System.Exception.GetStackTrace (System.Boolean needFileInfo) [0x00041] in <f712f98eb8e445c8918edaf595bbe465>:0 
      at System.Exception.get_StackTrace () [0x00000] in <f712f98eb8e445c8918edaf595bbe465>:0 
      at Fuchu.Impl+evalTestList@260-1.Invoke (System.Tuple`2[T1,T2] tupledArg) [0x00092] in <56a815db36d21f70a7450383db15a856>:0 
      at Microsoft.FSharp.Collections.Internal+IEnumerator+map@74[b,a].DoMoveNext (b& ) [0x00020] in <58dd0ce1dff9fae1a7450383e10cdd58>:0 
      at Microsoft.FSharp.Collections.Internal+IEnumerator+MapEnumerator`1[T].System-Collections-IEnumerator-MoveNext () [0x0000c] in <58dd0ce1dff9fae1a7450383e10cdd58>:0 
      at Microsoft.FSharp.Collections.SeqModule.ToList[T] (System.Collections.Generic.IEnumerable`1[T] source) [0x00064] in <58dd0ce1dff9fae1a7450383e10cdd58>:0 
      at Fuchu.Impl.eval (Fuchu.Impl+TestPrinters printer, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] map, Fuchu.Test tests) [0x0001f] in <56a815db36d21f70a7450383db15a856>:0 
      at <StartupCode$FSI_0001>.$FSI_0001.main@ () [0x00175] in <febf69b3213a401b8e3a679b586ebc14>:0 
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
      at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in <f712f98eb8e445c8918edaf595bbe465>:0   
    Stopped due to error
    
  • Custom User Avatar

    F# translation, tests are similar to the Python version