Ad
  • Custom User Avatar

    Fixed.

  • Custom User Avatar

    I was able to get this to pass by specifiying the result of the of the function (the kata) as int list.

    i.e: let GetIntegersFromList (listOfItems: Object list):int list =

    F# is inferring that the result is an Object list so the GetIntegersFromList function is Object list -> Object list. My guess is that the tests are not casting correclty, resulting in the error message error FS0001: The type 'int' does not match the type 'Object' when they loop/map over the results and try to compare values.

  • Custom User Avatar

    Having problem in F# - solution which passes tests using type checking gives this error with the real attempt: /home/codewarrior/program.fsx(37,55): error FS0001: The type 'int' does not match the type 'Object'

  • Custom User Avatar

    Made it shorter (which judging by the upvotes on Codewars, must mean better!)