Quick actions

cmd+k|ctrl+k

Navigation

Languages

Rotate

Snippet info

Language

Raku

Visibility

public

Author

fernando-correa

Created

2020-09-19T14:01:09Z

Updated

2020-09-19T14:01:09Z

sub rotate(@a, @b) {
    do for @b -> $b is copy {
        $b %= @a;
        [ |@a.tail(@a-$b), |@a.head: $b ]
    }
}

.say for rotate <10 20 30 40 50>, <3 4>
INFO