Commit 4387c16
authored
Clarify examples of slice behaviour (#297)
This fixes the examples in the language definition and adds a few more
examples to the test suite that mirror this documentation.
The first example demonstrates the inclusive-exclusive nature of the
indicies.
The middle two examples demonstrate the property of `array[:i]` not
overlapping with `array[i:]`.1 parent 2ce7cb6 commit 4387c16
2 files changed
+14
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
| 188 | + | |
| 189 | + | |
189 | 190 | | |
190 | | - | |
191 | 191 | | |
192 | 192 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
867 | 867 | | |
868 | 868 | | |
869 | 869 | | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
870 | 882 | | |
871 | 883 | | |
872 | 884 | | |
| |||
0 commit comments