Skip to content
Chris Petersen edited this page Oct 16, 2014 · 1 revision

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)
Clone this wiki locally