-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
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
reversing an array should preserve cyclic flag #16
Comments
Additional note: It appears that the |
I'd even go further and observe that if you want to make That having been said, if you want to write your own T[] reverse(T[] array) {
if (array.cyclic) {
T[] toreturn = array[-sequence(array.length)];
toreturn.cyclic = true;
return toreturn;
} else {
return array[reverse(array.length)];
}
} |
Current situation:
It seems more consistent that if
a
is cyclic, thenreverse(a)
ought to be cyclic as well.The text was updated successfully, but these errors were encountered: