Skip to content
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

Rotate function #4

Open
nojaf opened this issue Dec 14, 2018 · 3 comments
Open

Rotate function #4

nojaf opened this issue Dec 14, 2018 · 3 comments

Comments

@nojaf
Copy link

nojaf commented Dec 14, 2018

Would a rotate function be useful?
Similar how python has it.

@StephenCleary
Copy link
Owner

Do you need it?

@nojaf
Copy link
Author

nojaf commented Dec 16, 2018

There was one day in the Advent of code that I had a usecase for it. Thought it could help others as well if it is added out of the box. Feel free to disagree and close if you think otherwise.

@jzukowski
Copy link

I think I know what you're referring to, the marble game. the DE queue was great to solve that. As for the rotate, as long as you kept your current marble in the front or back, a simple call like d.AddToBack(d.RemoveFromFront()); or vice versa solved the issue. Rotate may be overkill. Great suggestion though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants