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.
Awesome explanation. I can see that you had lots of fun :P
For starters: I don't find it more readable. Additionally: code formatted like that cannot be formatted easily using an IDE. When I would refactor the name of the remove char function to RemoveCharAt, I'd have to manually reformat that code to get everything aligned. No problem for a tiny kata, but bound to result in very ugly code in big projects.
Heh, I think you're right about that. The second part of the concatenation is incorrect. good catch!
Maybe I'm dumb but I think your removeCharacterFromStringAt function does not do what it's supposed to if you don't supply it with the halfLength. Also I am aware that this has been written quite some time ago
Exactly, i did a loop as well(lol), i agree with you on looking at the problem much longer.
thank you 😁
love the use of CompareTo
This comment is hidden because it contains spoiler information about the solution
Great explanation.
Great explanation thanks!
Thanks for your comment.
Really cool to read that the code sparked an idea for you.
Have a merry, code-y Christmas!
I like how you have done this:
BunchOfCards : List
for your first class collection of cards.
I am going to start to do that in my code!
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.
Loading more items...