circshift

On Thursday, June 19, 2014 10:20:57 PM UTC+12, Paweł Biernat wrote:
>
> Is there a function that cycles the list as follows?
>
> cycle([1,2,3,4,5,6],2) -> [5,6,1,2,3,4]
> cycle([1,2,3,4,5,6],-2) -> [3,4,5,6,1,2]
> cycle([1,2,3,4,5,6],0) -> [1,2,3,4,5,6]
>
>

Reply via email to