sublist - part-cw/lambdanative GitHub Wiki

(sublist lst start end)

sublist returns a part (sublist) of a list.

Parameter Description
lst List to retrieve sublist from
start Start index
end End index

Example

Example 1: Return the middle 4 elements of a list from 0-10

> (define lst '(0 1 2 3 4 5 6 7 8 9 10))
> (sublist lst 4 8)
(4 5 6 7)