elliotchance / pie

🍕 Enjoy a slice! A utility library for dealing with slices and maps that focuses on type safety and performance.
https://pkg.go.dev/github.com/elliotchance/pie/v2
MIT License
1.96k stars 91 forks source link

added rotate #198

Closed SlothNinja closed 1 year ago

SlothNinja commented 1 year ago

I had a need to treat a slice as a circular shift register. Rotate permits circular shifts (i.e., rotates) to left or right.

SlothNinja commented 1 year ago

Still new to generating/updating pull requests. I added the requested feature to the rotate branch. Not sure what I need to do to update the pull request.