LTRIM
Trim an existing list so that it will contain only the specified range of elements specified. Both and stop
are zero-based indexes, where 0
is the first element of the list (the head), 1
the next element and so on.
and end
can also be negative numbers indicating offsets from the end of the list, where -1
is the last element of the list, -2
the penultimate element and so on.
A common use of LTRIM
is together with LPUSH
/ RPUSH
. For example: