diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2024-07-10 18:04:09 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2024-07-10 18:04:09 -0700 |
commit | d9d8beefbf45eaea89d4174e55df37ed89690ec9 (patch) | |
tree | 5efbeee3dac2f31244d28d45e3fdf9c9f957c031 | |
parent | a51888496ffbe18b3fcd7b27fec5c743a629a719 (diff) | |
download | txr-d9d8beefbf45eaea89d4174e55df37ed89690ec9.tar.gz txr-d9d8beefbf45eaea89d4174e55df37ed89690ec9.tar.bz2 txr-d9d8beefbf45eaea89d4174e55df37ed89690ec9.zip |
doc: partition, split, split*: clarifications about indices
* txr.1: Clarify what repeated values mean in partition,
since they are allowed. For split/split*, clarify that indice
have to be strictly increasing after negative indicates
are displaced by the sequence length, and that the behavior
is unspecified otherwise.
-rw-r--r-- | txr.1 | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -37204,8 +37204,10 @@ to its value. The sequence index positions thus denoted by shall be strictly nondecreasing. Each successive element is expected to designate an index position at least as high as all previous elements, otherwise the behavior is unspecified. -Leading index positions which are (still) negative, or zero, are effectively -ignored. +Index values which are still negative after the addition of the +sequence length are ignored, as are index values greater than +the sequence length. Nondecreasing means that repeated values +are permitted; they have the same effect as a single value. If .meta index-seq @@ -37310,6 +37312,14 @@ as the corresponding arguments of the function, with the following difference: the index positions indicated by .code index-seq are required to be strictly increasing, rather than nondecreasing. +As with +.codn partition , +this consideration applies to the transformed indices, after the +displacement of negative values by the length of the sequence. +If any element of +.meta index-seq +is not higher than the previous element, the behavior is unspecified. + If the second argument is of the form .metn index-seq , |