We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The current ergonomics of Shift<T> is terrible. I just haven't gotten around to fixing it yet.
Shift<T.Magnitude>(unchecked: Count(unchecked: index)) // ugh!
The text was updated successfully, but these errors were encountered:
I'll add a Shift<T>.one convenience because shifting by 1 is common:
integer.up (Shift.one) integer.down(Shift.one)
Note that the minimum binary integer size is 8 bits, so it is always valid. It also reads well.
Sorry, something went wrong.
Add: Shift<T>.one (#57) (#66).
3daf36d
Writing Shift<T.Magnitude> is a bit cumbersome, so I might consider a T.Shift alias:
Shift<T.Magnitude>
T.Shift
extension BinaryInteger { public typealias Shift = CoreKit.Shift<Magnitude> }
No branches or pull requests
The current ergonomics of Shift<T> is terrible. I just haven't gotten around to fixing it yet.
The text was updated successfully, but these errors were encountered: