File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -252,7 +252,7 @@ bracket-specifier =/ "[]" ;; ## Flatten Operator
252
252
; ; ```
253
253
254
254
slice-expression = [number ] " :" [number ] [ " :" [number ] ] ; ; ## Slices
255
- ; ; A slice expression allows you to select a contiguous subset of an array. A slice has a start, stop, and step value. The
255
+ ; ; A slice expression allows you to select a subset of an array. A slice has a start, stop, and step value. The
256
256
; ; general form of a slice is [start:stop:step], but each component is optional and can be omitted.
257
257
; ;
258
258
; ; ```note
@@ -264,9 +264,11 @@ slice-expression = [number] ":" [number] [ ":" [number] ] ;; ## Slices
264
264
; ;
265
265
; ; - The first element in the extracted array is the index denoted by start.
266
266
; ; - The last element in the extracted array is the index denoted by end - 1.
267
- ; ; - The step value determines how many indices to skip after each element is selected from the array. An array of 1
268
- ; ; (the default step) will not skip any indices. A step value of 2 will skip every other index while extracting elements
269
- ; ; from an array. A step value of -1 will extract values in reverse order from the array.
267
+ ; ; - The step value determines how many indices to skip after each element is selected from the array.
268
+ ; ; The default step value of 1 will not skip any indices and will return a contiguous subset of the original array.
269
+ ; ; A step value greater than 1 will skip indices while extracting elements from an array. For instance, a step value of 2 will
270
+ ; ; skip every other index.
271
+ ; ; Negative step values start from the end of the array and extract elements in reverse order.
270
272
; ;
271
273
; ; Slice expressions adhere to the following rules:
272
274
; ;
You can’t perform that action at this time.
0 commit comments