arraySlice
arraySlice
> Functions
Returns a sublist of array containing all elements from position start to position end (exclusive).
If the increment parameter stride is passed, the function selects only one element every stride.
Parameters
- array: The original list.
- start: The start position.
- end: The end position (excluded).
- stride: The increment (by default
1).
Return
- slice: The produced sub-list.
Examples
- Access to a range: returns a new list containing elements at position from 10 (included) to 20 (excluded).
- Access to a range with increment: returns elements at positions 10, 13, 16, 19.
- Negative increment: returns elements at position 20, 17, 14, 11