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.
Fixed.
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 theGetIntegersFromList
function isObject list -> Object list
. My guess is that the tests are not casting correclty, resulting in the error messageerror FS0001: The type 'int' does not match the type 'Object'
when they loop/map over the results and try to compare values.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'
Made it shorter (which judging by the upvotes on Codewars, must mean better!)