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.
I have not solved this myself so I can only speculate. I suspect that the input fish are limited to single digit ranges but that your own size can grow as large as the food eaten allows. Perhaps there is a pattern with regards to how much you eat and how big you get? Maybe we should consider ourselves a special fish that can gorow past the limits of all other fish? I realize that I am answering with more questions to a question, sorry about that.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This fork is unneeded. There was more recent code that I should have used as a starting point. Forking an old version to fix a warning is not very useful. I Don't know how to delete this thing.
I removed the string copying. It creates a warning. It should be fine to pass a string directly, given that strings are immutable in C#.
This comment is hidden because it contains spoiler information about the solution
I completed this Kata just now. I noticed that the test code made a warning appear. The warning goes like this:
tests/Fixture.cs(22,20): warning CS0618: 'string.Copy(string)' is obsolete: 'This API should not be used to create mutable strings. See https://go.microsoft.com/fwlink/?linkid=2084035 for alternatives.'
Given that C# strings are immutable, the offending line is unneded. I decided to make a fork with that line removed.
Then I ran into an issue: the
Assert.AreEqual
, that the test code uses, was not working anymore. So, I altered the test code to useAssert.That
instead.The motivation for all this was to remove the warning that the test code generates.
This comment is hidden because it contains spoiler information about the solution
It was my first time seeing
[,]
in C#. Before I have only seen[][]
for multidimensional arrys. Thanks for the lesson.This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Translated from C#. I'm new to F# so careful review recommended.
F# description tells to return
Nothing
if conversion is not possible. For F# it should readNone
instead ofNothing
.Loading more items...