I'm a Sr. Software Engineer at Flashpoint. I specialize in Python and Go, building functional, practical, and maintainable web systems leveraging Kubernetes and the cloud. Blog opinions are my own.
Oh, Array#rotate is perfect! My first version I'd zipped the arrays together like that, but then did it differently for the general case and ultimately converged on that solution. But I think I want to rewrite mine now, since Crystal supports rotate too!
I'm a Sr. Software Engineer at Flashpoint. I specialize in Python and Go, building functional, practical, and maintainable web systems leveraging Kubernetes and the cloud. Blog opinions are my own.
Originally i was just doing it with the index and math, but then I was scrolling through the array docs looking for something neat and found rotate. I didn’t to know about it, but it’s supercool :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I’m in! I’d never heard of this before now, but it looks cool :) Here’s my solutions.. Thanks for sharing this!
Oh,
Array#rotateis perfect! My first version I'd zipped the arrays together like that, but then did it differently for the general case and ultimately converged on that solution. But I think I want to rewrite mine now, since Crystal supportsrotatetoo!Originally i was just doing it with the index and math, but then I was scrolling through the array docs looking for something neat and found rotate. I didn’t to know about it, but it’s supercool :)