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.
You probably haven't provided usage of the function. So compiler was confused:
But if you add something like code below, then type will be inferred as int64.
Error message gives you a hint though: "Consider adding further type constraints"
A blind guess would be that the error stems from the use of Seq.reduce, which needs to start out with the zero-value of the type at hand. For an integer, that would be 0. However, because of the code before the reduce call, the type might only be known as IComparable, and the zero value cannot be derived from that.
That's what I think when I see the error message. I only did F# during a holiday a while back, so it's not up front knowledge to me, but I hope this helped in some way.
Compiler didn't let me do this:
Type constraint mismatch when applying the default type 'System.IComparable' for a type inference variable. The type 'System.IComparable' does not support the operator 'get_Zero' Consider adding further type constraints
Any ideas? This was my first intention.