LMOVE
Since 1.1.0Lists
Syntax
LMOVE source destination LEFT|RIGHT LEFT|RIGHTRemoves an element from one end of source and adds it to one end of destination, in one step. LEFT is the head, RIGHT the tail. source and destination can be the same list, to rotate it.
Reply
- The element moved.
nilifsourcedoes not exist.
Examples
> RPUSH src a b c
(integer) 3
> LMOVE src dst RIGHT LEFT
"c"
> LMOVE src dst LEFT RIGHT
"a"
> LRANGE dst 0 -1
1) "c"
2) "a"