summaryrefslogtreecommitdiffstats
path: root/iredis/data/commands/lset.md
blob: 8f1c3915945e0589942680cbdd8ed5c07a9090db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Sets the list element at `index` to `element`.
For more information on the `index` argument, see `LINDEX`.

An error is returned for out of range indexes.

@return

@simple-string-reply

@examples

```cli
RPUSH mylist "one"
RPUSH mylist "two"
RPUSH mylist "three"
LSET mylist 0 "four"
LSET mylist -2 "five"
LRANGE mylist 0 -1
```