Learn R Programming

rredis (version 1.6.9)

redisLPop: Remove the first element from a list.

Description

Atomically return and remove the first element of the list. For example if the list contains the elements "a","b","c" redisLPop will return "a" and the list will become "b","c".

Usage

redisLPop(key, ...)

Arguments

key
The desired key associated with a list.
...
Optional additional arguments. Specify raw=TRUE to skip de-serialization of the data.

Value

  • The first element of the list associated with the specified key, or NULL if the list is empty.

References

http://redis.io/commands

See Also

redisRPop, redisLPush

Examples

Run this code
redisConnect()
redisLPush('a',1)
redisLPush('a',2)
redisLPush('a',3)
redisLPop('a')

Run the code above in your browser using DataLab