Ds\Deque::rotate
Ds\Deque::rotate
(PECL ds >= 1.0.0)
Ds\Deque::rotate — Rotates the deque by a given number of rotations.
Description
public void Ds\Deque::rotate ( int $rotations )
Rotates the deque by a given number of rotations, which is equivalent to successively calling $deque->push($deque->shift())
if the number of rotations is positive, or $deque->unshift($deque->pop())
if negative.
Parameters
-
rotations