You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'll take a moment to enjoy the silly things. Fibonacci<T> is one of the earliest models, but this library has evolved a lot since its introduction. As a result, I want to rework it in the following ways:
The 1st point makes it so there's only one way to fail, hence the 3rd. The 2nd point makes it easier to use, and the 3rd point essentially turns it into an iterator without actually turning it into an iterator. The 4th point lets you create an instance from a trusted source, which makes some testing strategies more viable. The the 5th point is partially to ignore errors when only the other element overflows, and partially for discoverability.
I'll take a moment to enjoy the silly things.
Fibonacci<T>is one of the earliest models, but this library has evolved a lot since its introduction. As a result, I want to rework it in the following ways:consumingandmethodsmutatingthrowswithOptional<Self> & BoolBinaryInteger.fibonacci(_:)functionsThe 1st point makes it so there's only one way to fail, hence the 3rd. The 2nd point makes it easier to use, and the 3rd point essentially turns it into an iterator without actually turning it into an iterator. The 4th point lets you create an instance from a trusted source, which makes some testing strategies more viable. The the 5th point is partially to ignore errors when only the other element overflows, and partially for discoverability.